RE: ReplicationSlotRelease() crashes when the instance is in the single user mode
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: "'pgsql-hackers@lists.postgresql.org'" <pgsql-hackers@lists.postgresql.org>, 'Michael Paquier' <michael@paquier.xyz>
Date: 2025-02-19T02:57:34Z
Lists: pgsql-hackers
Attachments
- 0001-Prohibit-slot-operations-while-in-the-single-user-mo.patch (application/octet-stream) patch 0001
Dear hackers, Based on the discussion, I feel it is enough to add quick error out for SQL functions. PSA attached. Best regards, Hayato Kuroda FUJITSU LIMITED > -----Original Message----- > From: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> > Sent: Tuesday, February 18, 2025 5:24 PM > To: 'Michael Paquier' <michael@paquier.xyz> > Cc: 'pgsql-hackers@lists.postgresql.org' <pgsql-hackers@lists.postgresql.org> > Subject: RE: ReplicationSlotRelease() crashes when the instance is in the single > user mode > > Dear Michael, > > > Ah, good point for the slot drop. So 0ce5cf2ef24f is claiming that > > some of these manipulations are OK. I didn't suspect this one. > > Yeah, I think so. > > > Slot advancing is a very different beast, unfortunately, that may > > depend on many other subsystems. For example with logical slots we > > would finish by calling rm_decode, which could be outside of core. > > Justifying that this operation is supported in single-user mode is > > larger than what you are suggesting here.. > > OK. Actually, I do not have any use-cases in my mind. I played because > I found a special path for single user mode in ReplicationSlotAcquire() > so that I wanted to see the behavior. > > Best regards, > Hayato Kuroda > FUJITSU LIMITED > >
Commits
-
Fix assertion failure with replication slot release in single-user mode
- 8ed079cad824 13.23 landed
- 32d388d00f9f 14.20 landed
- 818be9b73c94 15.15 landed
- fea1cc3f75ff 16.11 landed
- 07a302387176 17.7 landed
- ea1c6b0b0aec 18.0 landed
- 1f2e51e3c7c2 19 (unreleased) landed