Re: Non-reserved replication slots and slot advancing

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Postgres hackers <pgsql-hackers(at)postgresql(dot)org>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndQuadrant(dot)com>
Subject: Re: Non-reserved replication slots and slot advancing
Date: 2018-07-04 01:57:31
Message-ID: 20180704015731.GE1672@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 03, 2018 at 01:51:48PM -0400, Alvaro Herrera wrote:
> On 2018-Jul-03, Andres Freund wrote:
>> Fair enough, but that's what a plain slot allows you as well, pretty
>> fundamentally, no? The precise point at which recycling will be blocked
>> will differer, sure.

ReplicationSlotsComputeRequiredLSN() is careful enough to discard slots
which have their restart_lsn set to InvalidXLogRecPtr, so they are not
accounted within the minimum LSN calculated for segment retention. Any
fake value added by a user advancing a non-reserved slot is.

At the end, are their any objections into fixing the issue and
tightening the advancing API?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2018-07-04 02:00:46 Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.
Previous Message David Rowley 2018-07-04 01:55:21 Re: pgsql: Clarify use of temporary tables within partition trees