Re: Issue with logical replication slot during switchover

From: Fabrice Chapuis <fabrice636861(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Issue with logical replication slot during switchover
Date: 2025-08-14 09:09:13
Message-ID: CAA5-nLDtag0D2WiVrhHWWJfEzR=4UerLmeF9X38GUfdqHTOh=w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'll work on pg_create_logical_replication_slot() API. pg_replication_slots
view must also be adjusted to display the new flag allow_overwrite.

Regards

Fabrice

On Thu, Aug 14, 2025 at 8:07 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:

> On Wed, Aug 13, 2025 at 9:29 PM Fabrice Chapuis <fabrice636861(at)gmail(dot)com>
> wrote:
> >
> > Thanks for sharing this. In fact, I agree, introducing an
> allow_overwrite slot property makes seems cleaner than a GUC for this
> specific use case.
> >
> > a) At first, an extension of pg_create_logical_replication_slot() could
> be proposed
> > b) pg_alter_logical_replication_slot(): that could be is a neat
> approach, a generic API for modifying other slot properties seems like a
> forward-looking design choice. However I don't know if slot properties
> could be modified easily because when slot is active, a process is holding
> them in memory.
>
> Right, it can not be.This API can be used when the slot is not
> acquired by any other process. We may have use-cases for that as well
> similar to one we have for this switchover case.
>
> thanks
> Shveta
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-08-14 09:09:53 Re: Excessive LOG messages from replication slot sync worker
Previous Message Benoit Tigeot 2025-08-14 09:04:27 Re: pg_stat_statements: Add `calls_aborted` counter for tracking query cancellations