Re: replication slot restart_lsn initialization

From: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Gurjeet Singh <gurjeet(at)singh(dot)im>, "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-08-14 09:09:38
Message-ID: CACACo5QbsK6KF2xXB3n=M=LukyW6VfXLrK=vALL62_kqqgHnGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 14, 2015 at 9:54 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:

> On 2015-08-14 16:44:44 +0900, Michael Paquier wrote:
> > Commit 6fcd8851, which is the result of this thread, is not touching
> > the replication protocol at all. This looks like an oversight to me:
> > we should be a maximum consistent between the SQL interface and the
> > replication protocol if possible, and it looks useful to me to be able
> > to set restart_lsn when creating the slot as well when using a
> > replication connection.
>
> It wasn't, at least not from my side. You can relatively easily do
> nearly the same just by connecting to the slot and sending a feedback
> message. The complaint upthread (and/or a related thread) was that it's
> not possible to do the same from SQL.
>
> It'd be a good additional to offer the same facility to the replication
> protocol.
>
> > For now we can do that: CREATE_REPLICATION_SLOT IDENT K_PHYSICAL We
> > could append a keyword like RESERVE on this query. Or go through more
> > fancy things like (slot_options) where slot_options is a list of
> > option items, reserve = on/off. Thoughts? -- Michael
>
> I'd name it RESERVE_WAL. My feeling is that the options for the logical
> case are geared towards the output plugin, not the walsender. I think
> it'd be confusing to use (slot_options) differently for physical slots.
>

Yes, but the options list you pass to START_REPLICATION ... LOGICAL, not to
CREATE_REPLICATION_SLOT.

2c
--
Alex

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-08-14 09:10:47 Re: replication slot restart_lsn initialization
Previous Message Andres Freund 2015-08-14 07:54:01 Re: replication slot restart_lsn initialization