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: 'Amit Kapila' <amit.kapila16@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Date: 2025-02-20T12:29:43Z
Lists: pgsql-hackers
Dear Amit, > Also, what about pg_replication_origin_* APIs? Do we want to restrict > those as well if we are restricting slot operations? I don't see any > solid theory presented in this thread on why we should add new checks > in multiple APIs restricting those in single-user mode. As David [1] and documentation [2] described, single user mode is typically used for initialization, debugging and recovery purpose - not for normal purposes. I think doing replication stuffs is not intended. Tom also considered like that [4]. The error I reported seemed to be introduced seven years ago (0ce5cf2), and no one has reported till now. This also implies that there are no reasons to support it. Ideally, functions described in [5] can be banned in the single-user mode, except the pg_drop_replication_slot(). Thought? [1]: https://www.postgresql.org/message-id/CAKFQuwbnBkGZAM%2B5b1DWmbqU5W7b1r-nQsw87BukrUC5WLrJXg%40mail.gmail.com [2]: https://www.postgresql.org/docs/devel/app-postgres.html [3]: https://www.postgresql.org/message-id/3b2f809f-326c-38dd-7a9e-897f957a4eb1%40enterprisedb.com [4]: https://www.postgresql.org/message-id/25024.1525789919%40sss.pgh.pa.us [5]: https://www.postgresql.org/docs/devel/functions-admin.html#FUNCTIONS-REPLICATION 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