public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bertrand Drouvot <[email protected]>
To: Bharath Rupireddy <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
Date: Fri, 9 Feb 2024 07:42:53 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALj2ACUbp55FXw2cp_noHexQXrSLh4Cgm0=3kxz0G5WShNTDwg@mail.gmail.com>
References: <CALj2ACW4aUe-_uFQOjdWCEN-xXoLGhmvRFnL8SNw_TZ5nJe+aw@mail.gmail.com>
<[email protected]>
<CALj2ACUbp55FXw2cp_noHexQXrSLh4Cgm0=3kxz0G5WShNTDwg@mail.gmail.com>
Hi,
On Wed, Feb 07, 2024 at 12:22:07AM +0530, Bharath Rupireddy wrote:
> On Mon, Feb 5, 2024 at 3:15 PM Bertrand Drouvot
> <[email protected]> wrote:
> >
> > I'm not sure I like the fact that "invalidations" and "conflicts" are merged
> > into a single field. I'd vote to keep conflict_reason as it is and add a new
> > invalidation_reason (and put "conflict" as value when it is the case). The reason
> > is that I think they are 2 different concepts (could be linked though) and that
> > it would be easier to check for conflicts (means conflict_reason is not NULL).
>
> So, do you want conflict_reason for only logical slots, and a separate
> column for invalidation_reason for both logical and physical slots?
Yes, with "conflict" as value in case of conflicts (and one would need to refer
to the conflict_reason reason to see the reason).
> Is there any strong reason to have two properties "conflict" and
> "invalidated" for slots?
I think "conflict" is an important topic and does contain several reasons. The
slot "first" conflict and then leads to slot "invalidation".
> They both are the same internally, so why
> confuse the users?
I don't think that would confuse the users, I do think that would be easier to
check for conflicting slots.
I did not look closely at the code, just played a bit with the patch and was able
to produce something like:
postgres=# select slot_name,slot_type,active,active_pid,wal_status,invalidation_reason from pg_replication_slots;
slot_name | slot_type | active | active_pid | wal_status | invalidation_reason
-------------+-----------+--------+------------+------------+---------------------
rep1 | physical | f | | reserved |
master_slot | physical | t | 1482441 | unreserved | wal_removed
(2 rows)
does that make sense to have an "active/working" slot "ivalidated"?
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (2+ messages)
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox