public inbox for [email protected]  
help / color / mirror / Atom feed
From: SATYANARAYANA NARLAPURAM <[email protected]>
To: Fujii Masao <[email protected]>
Cc: shveta malik <[email protected]>
Cc: vignesh C <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: shveta malik <[email protected]>
Subject: Re: [PATCH] Release replication slot on error in SQL-callable slot functions
Date: Wed, 27 May 2026 18:08:21 -0700
Message-ID: <CAHg+QDf3X1M=2jK0udwjaeO=GsZxfwjNDApZ-0nwUeJfp1LDXA@mail.gmail.com> (raw)
In-Reply-To: <CAHGQGwEoENMBTu0=f2h5_GFfTc-dGEo+_CfS0jinPwTX2AcyYA@mail.gmail.com>
References: <CAHg+QDeuf9tCq3ce=kgFMJP0m=PZC+wi6B=yS+7V0vNXjLS31w@mail.gmail.com>
	<CAHGQGwFZaWj8DctXuhWQZwSqi631=NKzQJyDV4yqT1Qapt8MFQ@mail.gmail.com>
	<CALDaNm1Jjun=by60V-4EpLZe4pAKy0qVZ7ptyHGVCuDyKfo2xQ@mail.gmail.com>
	<CAHg+QDcu2x0mjkBSqRxP_8EQ6UmpuX_jMgdKLDkAL1=N6wzZCQ@mail.gmail.com>
	<CAJpy0uCmW_NUZN8mw26onvfoFzH_oMrFSKhLUhz896nDgf8c7Q@mail.gmail.com>
	<CAHg+QDcf_9prAX=TaSO3UUiCLVD53bEw-KLqzAEXi+ud7h+Z4w@mail.gmail.com>
	<CAJpy0uBShUF_xm0=BVWivpWHt-4zs__k_3wL1RRjpi0Av8nsog@mail.gmail.com>
	<CAHg+QDf5PVyFgesBNs1GvOnuk_khoXifo96A7QW1EJ8zhhBxyw@mail.gmail.com>
	<CAJpy0uCCqFLY7pu0RQVcS9fRr0FimFMuHPsMBQ-KzEGX3BEGPA@mail.gmail.com>
	<CAJpy0uDHMvpUAdwXA3X7ugmO8S7kry-ZtrKUcugpX3WWp8hykw@mail.gmail.com>
	<CAHg+QDdEGGQrmQXwH0_Y+DRe_tx5jxv9K+7vpCnooQn2_6QykA@mail.gmail.com>
	<CAJpy0uBo-OuzyZZ=LY8L48Udt8=1Mffh2rrpXaTbKK_F9sJx7A@mail.gmail.com>
	<CAHg+QDeKC=_31Fvs2pOVkJCdkpNuoJmLmXV5hOApStpODYWsXw@mail.gmail.com>
	<CAHGQGwEoENMBTu0=f2h5_GFfTc-dGEo+_CfS0jinPwTX2AcyYA@mail.gmail.com>

Hi,

On Wed, May 27, 2026 at 1:12 AM Fujii Masao <[email protected]> wrote:

> On Wed, May 27, 2026 at 1:31 PM SATYANARAYANA NARLAPURAM
> <[email protected]> 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.
>
> 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?
>

Addressed these in v5 patch, will send out shortly. ALTER_REPLICATION_SLOT
is not exploitable by a SQL query though it has a similar signature.
A walsender error terminates the session so there is no session to leave in
a bad state.


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Release replication slot on error in SQL-callable slot functions
  In-Reply-To: <CAHg+QDf3X1M=2jK0udwjaeO=GsZxfwjNDApZ-0nwUeJfp1LDXA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox