Re: replication slot restart_lsn initialization - Mailing list pgsql-hackers

From Gurjeet Singh
Subject Re: replication slot restart_lsn initialization
Date
Msg-id CABwTF4Ud2jhKm1GhrYG_3dsJOv7oUqG1ExmhnjqVTd7bee_6Ew@mail.gmail.com
Whole thread Raw
In response to Re: replication slot restart_lsn initialization  (Andres Freund <andres@anarazel.de>)
Responses Re: replication slot restart_lsn initialization  (Gurjeet Singh <gurjeet@singh.im>)
List pgsql-hackers
On Wed, Jun 10, 2015 at 8:36 AM, Andres Freund <andres@anarazel.de> wrote:
On 2015-06-10 08:24:23 -0700, Gurjeet Singh wrote:
> On Wed, Jun 10, 2015 at 8:07 AM, Andres Freund <andres@anarazel.de> wrote:
> > That doesn't look right to me. Why is this code logging a standby
> > snapshot for physical slots?
> >
>
> This is the new function I referred to above. The logging of the snapshot
> is in 'not RecoveryInProgress()' case, meaning it's running in primary and
> not in a standby.

It's still done uselessly for physical slots?

I missed the comments on LogStandbySnapshot(). Attached is the new patch which does the snapshot logging only for a logical replication slot.

I am in the process of writing up a doc patch, and will submit that as well in a short while.

I have removed a few #include statements which seemed unnecessary. These changes are not relevant to the patch, so I can readily revert those parts if deemed necessary.

Best regards,
--
Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Fix logical decoding sendtime update
Next
From: Alvaro Herrera
Date:
Subject: Re: reaper should restart archiver even on standby