Re: pgsql: Track last_inactive_time in pg_replication_slots.

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Amit Kapila <akapila(at)postgresql(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Track last_inactive_time in pg_replication_slots.
Date: 2024-03-26 15:39:55
Message-ID: 202403261539.xcjfle7sksz7@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2024-Mar-26, Nathan Bossart wrote:

> FWIW I'd really prefer to have something like max_slot_xid_age for this. A
> time-based parameter would likely help with most cases, but transaction ID
> usage will vary widely from server to server, so it'd be nice to have
> something to protect against wraparound more directly.

Yeah, I tend to agree that an XID-based limit makes more sense than a
time-based one.

> I don't object to a
> time-based setting as well, but that won't always work as well for this
> particular use-case, especially if we are relying on users to set a
> slot-level parameter.

I think slot-level parameters are mostly useless, because it takes just
one slot where you forget to set it for disaster to strike.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2024-03-26 15:44:59 pgsql: Allow "make check"-style testing to work with musl C library.
Previous Message Nathan Bossart 2024-03-26 15:11:31 Re: pgsql: Allow using syncfs() in frontend utilities.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-03-26 15:45:55 Re: Regression tests fail with musl libc because libpq.so can't be loaded
Previous Message Jeff Davis 2024-03-26 15:37:04 Re: New Table Access Methods for Multi and Single Inserts