pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: jgdr@dalibo.com
Cc: andres@anarazel.de
Cc: michael@paquier.xyz
Cc: sawada.mshk@gmail.com
Cc: peter.eisentraut@2ndquadrant.com
Cc: pgsql-hackers@lists.postgresql.org
Cc: thomas.munro@enterprisedb.com
Cc: sk@zsrv.org
Cc: michael.paquier@gmail.com
Subject: Re: [HACKERS] Restricting maximum keep segments by repslots
Date: Wed, 29 Apr 2020 21:32:02 -0400
Message-ID: <20200430013202.GA22210@alvherre.pgsql> (raw)
In-Reply-To: <20200430.102520.937018442080739049.horikyota.ntt@gmail.com>

On 2020-Apr-30, Kyotaro Horiguchi wrote:

> At Tue, 28 Apr 2020 20:47:10 -0400, Alvaro Herrera <alvherre@2ndquadrant.com> wrote in 

> > 		/*
> > 		 * After the sanity checks in CreateDecodingContext, make sure the
> > 		 * restart_lsn is valid.  Avoid "cannot get changes" wording in this
> > 		 * errmsg because that'd be confusingly ambiguous about no changes
> > 		 * being available.
> > 		 */
> > 		if (XLogRecPtrIsInvalid(MyReplicationSlot->data.restart_lsn))
> > 			ereport(ERROR,
> > 					(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
> > 					 errmsg("can no longer get changes from replication slot \"%s\"",
> > 							NameStr(*name)),
> > 					 errdetail("This slot has never previously reserved WAL, or has been invalidated.")));
> > 
> > I hope this is sufficiently clear, but if not, feel free to nudge me and
> > we can discuss it further.
> 
> That somewhat sounds odd that 'we "no longer" get changes from "never
> previously reserved" slots'.  More than that, I think we don't reach
> there for physical slots, since CreateDecodingContext doesn't accept a
> physical slot and ERRORs out.  (That is the reason for the location of
> the checking.)

Oh, right, so we could reword the errdetail to just "This slot has been
invalidated."

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (143+ messages)  latest in thread

Message-ID: <20200430013202.GA22210@alvherre.pgsql>
Permalink:  ../20200430013202.GA22210@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200430013202.GA22210@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, horikyota.ntt@gmail.com, jgdr@dalibo.com, andres@anarazel.de, michael@paquier.xyz, sawada.mshk@gmail.com, peter.eisentraut@2ndquadrant.com, pgsql-hackers@lists.postgresql.org, thomas.munro@enterprisedb.com, sk@zsrv.org, michael.paquier@gmail.com
  Subject: Re: [HACKERS] Restricting maximum keep segments by repslots
  In-Reply-To: <20200430013202.GA22210@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox