Re: Allow non-superuser to cancel superuser tasks.

x4mmm@yandex-team.ru

From: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
To: Michael Paquier <michael@paquier.xyz>
Cc: Nathan Bossart <nathandbossart@gmail.com>, Kirill Reshke <reshkekirill@gmail.com>, "Leung, Anthony" <antholeu@amazon.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2024-06-21T08:44:06Z
Lists: pgsql-hackers

> On 21 Jun 2024, at 10:36, Michael Paquier <michael@paquier.xyz> wrote:
> 
> On Fri, Jun 14, 2024 at 03:12:50PM -0500, Nathan Bossart wrote:
>> On Fri, Jun 14, 2024 at 12:06:36PM +0500, Andrey M. Borodin wrote:
>>> This patch looks good to me.
>> 
>> Thanks for looking.
> 
> While double-checking the whole, where I don't have much to say about
> 0001, I have fixed a few issues with the test presented upthread and
> stabilized it (CI and my stuff are both OK).  I'd suggest to move it
> to test_misc/, because there is no clear category where to put it, and
> we have another test with injection points there for timeouts so the
> module dependency with EXTRA_INSTALL is already cleared.
> 
> What do you think?

Thanks Michael!

All changes look good to me.

I just have one more concern: we do not wakeup() upon test end. I observed that there might happen more autovacuums and start sleeping in injection point. In every case I observed - these autovacuums quit gracefully. But is it guaranteed that test will shut down node even if some of backends are waiting in injection points?
Or, perhaps, should we always wakeup() after detaching? (in case when new point run might happen)


Best regards, Andrey Borodin.




Commits

  1. Look up backend type in pg_signal_backend() more cheaply.

  2. Add tap test for pg_signal_autovacuum role

  3. Introduce pg_signal_autovacuum_worker.

  4. Add a slot synchronization function.

  5. Ban role pg_signal_backend from more superuser backend types.