Re: Non-reserved replication slots and slot advancing
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael@paquier.xyz>, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, pgsql-hackers@postgresql.org, petr@2ndquadrant.com, simon@2ndQuadrant.com
Date: 2018-07-09T18:48:28Z
Lists: pgsql-hackers
On 2018-Jul-09, Andres Freund wrote:
> On 2018-07-09 15:48:33 +0900, Michael Paquier wrote:
> > + if (XLogRecPtrIsInvalid(MyReplicationSlot->data.restart_lsn))
> > + {
> > + ReplicationSlotRelease();
> > + ereport(ERROR,
> > + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> > + errmsg("cannot move slot not reserving WAL")));
> > + }
> > +
>
> I don't like this error message. It's unclear what refers to exactly
> what. Nor is "move" a terminology used otherwise. How about:
> "cannot advance replication slot that has not previously reserved WAL"
> or something similar?
>
> Also, ERRCODE_FEATURE_NOT_SUPPORTED doesn't quite seem right. How about
> ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE?
+1 to both of Andres' suggestions.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Block replication slot advance for these not yet reserving WAL
- 9069eb95f48c 11.0 landed
- 56a714721343 12.0 landed