Re: Non-reserved replication slots and slot advancing

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andres Freund <andres@anarazel.de>, Postgres hackers <pgsql-hackers@postgresql.org>, Petr Jelinek <petr@2ndquadrant.com>, Simon Riggs <simon@2ndQuadrant.com>
Date: 2018-07-05T03:19:20Z
Lists: pgsql-hackers
On Wed, Jul 04, 2018 at 09:57:31AM -0400, Alvaro Herrera wrote:
> None from me.

Thanks Alvaro.  For now the patch uses the following error message:
+SELECT pg_replication_slot_advance('regression_slot3', '0/1'); -- error
+ERROR:  cannot move slot with non-reserved restart_lsn

Mentioning directly the column name of pg_replication_slots is confusing
I think.  Here are some suggestions of perhaps better error messages:
1) cannot move unreserved slot.
2) cannot move slot which has never been reserved.

Any better ideas?
--
Michael

Commits

  1. Block replication slot advance for these not yet reserving WAL