Hi, On Sat, Aug 8, 2026 at 8:33 PM Bryan Green <[email protected]> wrote: > > A SQL slot function that errors after acquiring MyReplicationSlot leaks the > slot when the error is caught by a PL/pgSQL EXCEPTION handler: the > subtransaction aborts without releasing it, MyReplicationSlot stays set, and > the next slot operation in the session trips Assert(!MyReplicationSlot). > > Releasing on error is done at the top level, in PostgresMain(), and the > comment there is explicit that AbortTransaction() must not do it:
Thanks. This issue is being discussed in this thread: https://www.postgresql.org/message-id/CALj2ACU-mVxrak_Q0EP1sZg8h%3D7pg1d09Gj6Ody5jH6zxiZQLA%40mail.gmail.com. -- Bharath Rupireddy Amazon Web Services: https://aws.amazon.com
