Re: ReplicationSlotRelease() crashes when the instance is in the single user mode - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: ReplicationSlotRelease() crashes when the instance is in the single user mode
Date
Msg-id CAA4eK1LK5nZUWwNY31X6BUXdQwwzpKGKxnw+zFf-cWKm3nuCEg@mail.gmail.com
Whole thread Raw
In response to RE: ReplicationSlotRelease() crashes when the instance is in the single user mode  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
List pgsql-hackers
On Thu, Feb 20, 2025 at 6:21 PM Hayato Kuroda (Fujitsu)
<kuroda.hayato@fujitsu.com> wrote:
>
> Dear hackers,
>
> Thanks everyone for giving comments! PSA new version.
> What's new:
>
> - Message format was modified to {"cannot use function %s in single-user mode", "function_name"}
> - Reporting funcname was adjusted based on the parameters. ternary operator was used.
> - Guard was added for functions in logicalfunction.c.
>

Shouldn't such a check be present in the CheckSlotPermissions() kind
of function to perform it in the central place?

> For now, functions for replication origin and replication messages were retained.
> I can handle them after the discussion.
>

Which other functions do we see similar restrictions? I checked
"sequence manipulation functions" (1), and "Transaction ID and
Snapshot Information Functions" (2) but couldn't see similar
restrictions.

(1) - https://www.postgresql.org/docs/current/functions-sequence.html
(2) - https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-INFO-SNAPSHOT

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Andy Alsup
Date:
Subject: Update docs for UUID data type
Next
From: Corey Huinker
Date:
Subject: Re: Statistics Import and Export