From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org, petr(at)2ndquadrant(dot)com, simon(at)2ndQuadrant(dot)com |
Subject: | Re: Non-reserved replication slots and slot advancing |
Date: | 2018-07-10 00:54:28 |
Message-ID: | 20180710005428.GE1661@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 09, 2018 at 02:48:28PM -0400, Alvaro Herrera wrote:
> 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?
"move" is used in another error message ten lines below.
> >
> > Also, ERRCODE_FEATURE_NOT_SUPPORTED doesn't quite seem right. How about
> > ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE?
>
> +1 to both of Andres' suggestions.
Those indeed sound better. What do you think of the attached?
--
Michael
Attachment | Content-Type | Size |
---|---|---|
slot-advance-unreserved-v4.patch | text/x-diff | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuro Yamada | 2018-07-10 01:09:09 | Re: Postgres 11 release notes |
Previous Message | Andres Freund | 2018-07-10 00:52:16 | Re: Usage of epoch in txid_current |