Re: Allowing pg_recvlogical to create temporary replication slots

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Torsten Förtsch <tfoertsch123(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Allowing pg_recvlogical to create temporary replication slots
Date: 2024-11-04 11:31:02
Message-ID: CAA4eK1LkuS3WfWZHvYggBu3_mEM3xPZEDuMZJBv2Xf0Dm=D2vw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 1, 2024 at 6:13 PM Torsten Förtsch <tfoertsch123(at)gmail(dot)com> wrote:
>
> On Wed, Oct 30, 2024 at 9:01 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>>
>> On 27.10.24 13:37, Torsten Förtsch wrote:
>> > The attached patch enables pg_recvlogical to create a temporary slot.
>>
>> I think you should explain a bit why you want to do that, what use case
>> or scenario this is meant to address.
>
>
> In my particular case I want to filter for messages sent by pg_logical_emit_message(). I don't care much about getting ALL the changes. If the replication slot disappears and a few changes are lost it does not matter. So, a temporary rep slot makes more sense than creating one and then having to make sure it is not retaining wal forever later.
>
> I can imagine this also as a tool to monitor changes for a while and then simply disconnect without the need to remove the slot.
>

Your use case sounds reasonable to me. So, +1 for adding an option for
temporary slots.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2024-11-04 11:33:51 Re: general purpose array_sort
Previous Message Daniel Gustafsson 2024-11-04 11:27:51 Re: Changing the state of data checksums in a running cluster