Re: pgsql: Track last_inactive_time in pg_replication_slots. - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pgsql: Track last_inactive_time in pg_replication_slots.
Date
Msg-id 202403261539.xcjfle7sksz7@alvherre.pgsql
Whole thread Raw
In response to Re: pgsql: Track last_inactive_time in pg_replication_slots.  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: pgsql: Track last_inactive_time in pg_replication_slots.
Re: pgsql: Track last_inactive_time in pg_replication_slots.
List 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/



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: New Table Access Methods for Multi and Single Inserts
Next
From: Bertrand Drouvot
Date:
Subject: Re: pgsql: Track last_inactive_time in pg_replication_slots.