Re: PostgreSQL doesn't stop propley when --slot option is specified with pg_receivexlog.

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, furuyao(at)pm(dot)nttdata(dot)co(dot)jp, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, teranishih(at)nttdata(dot)co(dot)jp
Subject: Re: PostgreSQL doesn't stop propley when --slot option is specified with pg_receivexlog.
Date: 2014-11-19 10:12:31
Message-ID: CAHGQGwGSnetTCFSCX-PGVUDOJRMTLwPVGb_XC+xSrjwKiNCX1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 19, 2014 at 5:15 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Wed, Nov 19, 2014 at 6:16 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> On Mon, Nov 17, 2014 at 12:30 PM, Michael Paquier
>> <michael(dot)paquier(at)gmail(dot)com> wrote:
>>> On Mon, Nov 17, 2014 at 10:02 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>>> On Sat, Nov 15, 2014 at 9:10 PM, Michael Paquier
>>>> <michael(dot)paquier(at)gmail(dot)com> wrote:
>>>>> Yep, sounds a good thing to do if master requested answer from the
>>>>> client in the keepalive message. Something like the patch attached
>>>>> would make the deal.
>>>>
>>>> Isn't it better to do this only when replication slot is used?
>>> Makes sense. What about a check using reportFlushPosition then?
>>
>> Sounds reasonable. Thanks for updating the patch!
>> But the patch could not already be applied to the master cleanly
>> because c4f99d2 heavily changed the code that the patch also touches...
>> I rewrote the patch and pushed it to both master and REL9_4_STABLE.
>> Anyway, thanks!
>
> Is this:
>
> + if (reportFlushPosition && lastFlushPosition < blockpos &&
> + walfile != 1)
>
> really correct? Shouldn't that walfile test be against -1 (minus one)?

Ooops... You're right. That's really mistake... Just fixed and pushed. Thanks!

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2014-11-19 10:49:08 Re: Patch to support SEMI and ANTI join removal
Previous Message Ashutosh Bapat 2014-11-19 09:21:44 Re: postgres_fdw behaves oddly