On Mon, Aug 18, 2025 at 08:47:27AM +0000, Hayato Kuroda (Fujitsu) wrote:
> Here are updated patches. Based on the Robert's suggestion, I separated into two parts.
> 0001 fixed the original issue and 0002 prohibited the slot manipulation in
> single-user mode. I want to focus on 0001 first because on one would argue it.
FWIW, I had my doubts at the beginning on the thread about the
use-case, but after re-reading the whole thing I am going to side with
Robert's opinion that if a fix to authorize some of the operations is
simple, then let's just authorize the case(s) and have the fix.
Echoing with Paul, what I find as critically lacking from the proposed
patches are regression tests to check and validate the behaviors you
are looking for in the patches. Please add some in the shape of perl
commands that use direct --single commands of postgres. We have cases
that do so currently in the tree: sepgsql and shm. I don't see a
reason why we could not do that as well here with run_log(). It is
also possible to pass a -c exit_on_error=true to force failures.
Not having a test for the single-user case of a slot drop is of course
something that we are lacking now. As we are playing with this area
of the code, let's add something for this case as well.
--
Michael