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

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Michael Paquier' <michael(at)paquier(dot)xyz>
Cc: 'Paul A Jungwirth' <pj(at)illuminatedcomputing(dot)com>, Mutaamba Maasha <maasha(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: ReplicationSlotRelease() crashes when the instance is in the single user mode
Date: 2025-08-20 07:42:11
Message-ID: OSCPR01MB14966EEA6534F4A07A1F1722EF533A@OSCPR01MB14966.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Michael,

I found you've pushed 0001. Thanks!
I've considered to create patches for other branches after you said OK, but
you seemed to push all of them directly.

> This has reminded me of 1a9d80282811, where I have used a trick with
> pg_ctl to allow single-user mode executions to bypass the privileged
> account permission failure, but I don't see what we could do here as
> we should pass down commands to postgres for execution via stdin for
> IPC::Run. We don't really have anything WIN32-specific, so skipping
> the tests on Windows sounds fine by me.

OK, thanks for the confirmation.

> One thing that you have forgotten is to update EXTRA_INSTALL to add
> test_decoding, or a make check in the module fails. I have expanded a
> bit more the tests, as for example we have paths based on active_pid
> for temporary slots, which could matter at some point. I have added a
> few more things with physical slots.

Oh, I didn't recognize because I usually use meson, and my CI said OK.
Good update!

> With all that in mind, I don't really see the point of 0002. There
> was also a mention of replication origins upthread, but we don't
> really have anything specific to a shared state or a validation in
> this area AFAIK, so I don't think that test additions are worth it in
> this case.

Let me clarify your point. For now, there are no decisions to prohibit origin
manipulations. 0002 only restricts to handle slots in the single-user mode. Did
you say that we do not have to do tests to ensure these SQL functions are
prohibited in the mode?

(Since senior members in this thread are against to restrict, I'm planning to
stop working 0002 after creating a final patch for the reference purpose)

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2025-08-20 07:57:16 Re: Generate GUC tables from .dat file
Previous Message Michael Paquier 2025-08-20 07:40:21 Re: Remove traces of long in dynahash.c