Re: Track in pg_replication_slots the reason why slots conflict?

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Track in pg_replication_slots the reason why slots conflict?
Date: 2023-12-21 02:50:16
Message-ID: CAA4eK1+Rp2gODDaWEOdpprVFUgj7P9xtsZT+SSsOT_oWPxUqDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 21, 2023 at 5:51 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> While listening at Bertrand's talk about logical decoding on standbys
> last week at Prague, I got surprised by the fact that we do not
> reflect in the catalogs the reason why a conflict happened for a slot.
> There are three of them depending on ReplicationSlotInvalidationCause:
> - WAL removed.
> - Invalid horizon.
> - Insufficient WAL level.
>

The invalidation cause is also required by one of the features being
discussed "Synchronize slots from primary to standby" [1] and there is
already a thread to discuss the same [2]. As that thread started
yesterday only, you may not have noticed it. Currently, the proposal
is to expose it via a function but we can extend it to also display
via view, feel free to share your opinion on that thread.

[1] - https://www.postgresql.org/message-id/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.com
[2] - https://www.postgresql.org/message-id/CAJpy0uBpr0ym12%2B0mXpjcRFA6N%3DanX%2BYk9aGU4EJhHNu%3DfWykQ%40mail.gmail.com

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-12-21 03:07:56 Re: Track in pg_replication_slots the reason why slots conflict?
Previous Message Zhijie Hou (Fujitsu) 2023-12-21 02:23:12 RE: Synchronizing slots from primary to standby