Re: ReplicationSlotRelease() crashes when the instance is in the single user mode

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: 'Paul A Jungwirth' <pj@illuminatedcomputing.com>, Mutaamba Maasha <maasha@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, "David G. Johnston" <david.g.johnston@gmail.com>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, Tom Lane <tgl@sss.pgh.pa.us>, Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-19T11:17:49Z
Lists: pgsql-hackers
On Tue, Aug 19, 2025 at 10:26:22AM +0000, Hayato Kuroda (Fujitsu) wrote:
> I added a first version of the test. It could work on my env (Linux).

You could also validate that using the CI, assuming that you have a
cloned repo on github with the CI enabled.  See src/tools/ci/README.
I use that a lot with local branches for pre-commit validations where
things could break across the board.

> Since I cannot come up the appropriate place, I introduced new test file in
> recovery test. creating/dropping/advancing a slot, and doing a logical decoding
> is tested. Since standby mode is not supported by the single-user instance,
> I did not test the slot synchronization. I have not known that.

Hmm.  src/test/modules/test_misc/ makes more sense to me here.  (No
need to send an updated patch just for that.)

> IIUC, 0001 can be backpatched for all supported branches. I will create for them
> after patch would be a good shape.

Thanks, I'll check all that tomorrow.
--
Michael

Commits

  1. Fix assertion failure with replication slot release in single-user mode