Re: Allowing pg_recvlogical to create temporary replication slots - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Allowing pg_recvlogical to create temporary replication slots
Date
Msg-id CAA4eK1LkuS3WfWZHvYggBu3_mEM3xPZEDuMZJBv2Xf0Dm=D2vw@mail.gmail.com
Whole thread Raw
In response to Re: Allowing pg_recvlogical to create temporary replication slots  (Torsten Förtsch <tfoertsch123@gmail.com>)
List pgsql-hackers
On Fri, Nov 1, 2024 at 6:13 PM Torsten Förtsch <tfoertsch123@gmail.com> wrote:
>
> On Wed, Oct 30, 2024 at 9:01 AM Peter Eisentraut <peter@eisentraut.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
gettingALL the changes. If the replication slot disappears and a few changes are lost it does not matter. So, a
temporaryrep 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
removethe slot. 
>

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

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: define pg_structiszero(addr, s, r)
Next
From: Dean Rasheed
Date:
Subject: Re: general purpose array_sort