On Thu, Mar 21, 2024 at 3:20 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > > My concern was that we set catalog_xmin at logical slot creation time. So > > if we > > set last_inactive_at to zero at creation time and the slot is not used for > > a long > > period of time > timeout, then I think it's not helping there. > > But, we do call ReplicationSlotRelease() after slot creation. For > example, see CreateReplicationSlot(). So wouldn't that take care of > the case you are worried about?
Right. That's true even for pg_create_physical_replication_slot and pg_create_logical_replication_slot. AFAICS, setting it to the current timestamp in ReplicationSlotRelease suffices unless I'm missing something. -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com