Re: replication slot restart_lsn initialization

From: Gurjeet Singh <gurjeet(at)singh(dot)im>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "Duran, Danilo" <danilod(at)amazon(dot)com>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: replication slot restart_lsn initialization
Date: 2015-06-10 16:10:50
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

On Wed, Jun 10, 2015 at 8:36 AM, Andres Freund <andres(at)anarazel(dot)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(at)anarazel(dot)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,
Gurjeet Singh

Attachment Content-Type Size
physical_repl_slot_activate_restart_lsn.v2.patch application/octet-stream 8.9 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-06-10 16:39:05 Re: reaper should restart archiver even on standby
Previous Message Andres Freund 2015-06-10 16:00:05 Re: Fix logical decoding sendtime update