Re: Non-reserved replication slots and slot advancing
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@postgresql.org>, Petr Jelinek <petr@2ndquadrant.com>, Simon Riggs <simon@2ndQuadrant.com>
Date: 2018-07-03T16:55:53Z
Lists: pgsql-hackers
Hi,
On 2018-06-26 16:13:05 +0900, Michael Paquier wrote:
> I have been chewing for the last couple of days on this email from
> Horiguchi-san:
> https://www.postgresql.org/message-id/20180622.163312.254556300.horiguchi.kyotaro@lab.ntt.co.jp
>
> As summarized, it is actually strange to be able to advance a slot which
> has a non-reserved restart_lsn. For example, take that which can happen
> on HEAD:
> =# select pg_create_physical_replication_slot('toto');
> pg_create_physical_replication_slot
> -------------------------------------
> (toto,)
> (1 row)
> =# select pg_replication_slot_advance('toto', '0/1');
> pg_replication_slot_advance
> -----------------------------
> (toto,0/1)
> (1 row)
> =# select slot_name, restart_lsn from pg_replication_slots ;
> slot_name | restart_lsn
> -----------+-------------
> toto | 0/1
> (1 row)
I'm not clear to why this is a problem? Seems like either behaviour can
be argued for. I don't really have an opinion either way. I'd just
remove the item from the open items list, I don't think we need to hold
up the release for it?
Greetings,
Andres Freund
Commits
-
Block replication slot advance for these not yet reserving WAL
- 9069eb95f48c 11.0 landed
- 56a714721343 12.0 landed