From: | <furuyao(at)pm(dot)nttdata(dot)co(dot)jp> |
---|---|
To: | <hlinnakangas(at)vmware(dot)com>, <masao(dot)fujii(at)gmail(dot)com> |
Cc: | <sawada(dot)mshk(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, <teranishih(at)nttdata(dot)co(dot)jp> |
Subject: | Re: pg_receivexlog --status-interval add fsync feedback |
Date: | 2014-10-08 04:23:14 |
Message-ID: | A9C510524E235E44AE909CD4027AE196BF7D6FB23D@MBX-MSG-SV03.msg.nttdata.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 09/29/2014 01:13 PM, furuyao(at)pm(dot)nttdata(dot)co(dot)jp wrote:
> >> I don't understand what this patch does. When would you want to use
> >> the new --reply-fsync option? Is there any reason *not* to use it?
> >> In other words, do we need an option for this, couldn't you just
> >> always send the feedback message after fsync?
> >
> > Thanks for the comment.
> >
> > --reply-fsync option is intended for use in synchronous mode.
> >
> > By specifying -F option and --slot option, process calls fsync() when
> > it received the WAL, and flush location would be set in feedback
> > message.
> >
> > Interval of sending feedback message depends on -s option in this
> > state, so in the case of synchronous mode, waiting for feedback
> > message would occure.
> >
> > therefore, --reply-fsync option is necessary. because it can send the
> > feedback message after fsync without waiting for the interval of -s
> > option.
> >
> > The reason for not sending the feedback message after fsync without
> > waiting for the interval of -s option always, is to answer the needs
> > who want to use fsync only (NOT using synchronous mode).
>
> I still don't get it. AFAICS there are two ways to use pg_receivexlog.
> Either you use it as a synchronous standby, or not.
>
> What set of options would you pass if you want to use it as a synchronous
> standby? And if you don't? Could we just have a single "--synchronous"
> flag, instead of -F and --reply-fsync?
Thanks for comment.
If you set "synchronous_commit" as "remote_write", the options would be different .
The set of options in each case, see the following.
Synchronous standby(synchronous_commit=on)
--fsync-interval=-1
--reply-fsync
--slot=slotname
Synchronous standby(synchronous_commit=remote_write)
--fsync-interval=-1
--reply-fsync
Asynchronous
There are no relative options.
Well, if the response time delay(value of "--status-interval=interval") is acceptable, "--reply-fsync" is unnecessary.
Instead of "--reply-fsync", using "--synchronous"(which summarizes the "--reply-fsync" and "fsync-interval = -1") might be easy to understand. Although, in that case, "--fsync-interval=interval" would be fixed value. Isn't there any problem ?
Regards,
--
Furuya Osamu
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2014-10-08 04:27:33 | Re: pg_receivexlog always handles -d option argument as connstr |
Previous Message | Fabrízio de Royes Mello | 2014-10-08 03:41:46 | Re: pgaudit - an auditing extension for PostgreSQL |