Re: [PATCH] Release replication slot on error in SQL-callable slot functions

shveta malik <shveta.malik@gmail.com>

From: shveta malik <shveta.malik@gmail.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, shveta malik <shvetamalik@gmail.com>
Date: 2026-05-27T10:59:59Z
Lists: pgsql-hackers

Attachments

On Wed, May 27, 2026 at 1:42 PM Fujii Masao <masao.fujii@gmail.com> wrote:
>
> On Wed, May 27, 2026 at 1:31 PM SATYANARAYANA NARLAPURAM
> <satyanarlapuram@gmail.com> wrote:
> > Thank you for the changes and review.
>
> When I applied the v4 patch together with Shveta's diff patch and
> ran the regression tests, the tests failed.

That is because my top-up patch lacks slot.out changes, I wanted Satya
to first confirm if the changes are acceptable to him. Attached
another top-up patch for test-output correction.

> Could pg_create_physical_replication_slot() still have the same issue
> if it throws an error after ReplicationSlotCreate() and that error is
> caught by a PL/pgSQL EXCEPTION block?
>
> Also, do maybe pg_copy_physical_replication_slot(), pg_drop_replication_slot(),
> and ALTER_REPLICATION_SLOT potentially have the same issue as well?
>

pg_copy_physical_replication_slot() should not have it as the common
'copy_replication_slot' is already fixed in the patch.  I will review
the others.

thanks
Shveta