Re: Allow non-superuser to cancel superuser tasks.
x4mmm@yandex-team.ru
From: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: "Leung, Anthony" <antholeu@amazon.com>,
Kirill Reshke <reshkekirill@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2024-04-02T11:35:28Z
Lists: pgsql-hackers
> On 2 Apr 2024, at 01:21, Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> I haven't looked too closely, but I'm pretty skeptical that the test suite
> in your patch would be stable. Unfortunately, I don't have any better
> ideas at the moment besides not adding a test for this new role.
We can add tests just like [0] with injection points.
I mean replace that "sleep 1" with something like "$node->wait_for_event('autovacuum worker', 'autocauum-runing');".
Currently we have no infrastructure to wait for autovacuum of particular table, but I think it's doable.
Also I do not like that test is changing system-wide autovac settings, AFAIR these settings can be set for particular table.
Thanks!
Best regards, Andrey Borodin.
[0] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=eeefd4280f6
Commits
-
Look up backend type in pg_signal_backend() more cheaply.
- 61171a632d10 18.0 landed
-
Add tap test for pg_signal_autovacuum role
- d2b74882cab8 18.0 landed
-
Introduce pg_signal_autovacuum_worker.
- ccd38024bc3c 18.0 landed
-
Add a slot synchronization function.
- ddd5f4f54a02 17.0 cited
-
Ban role pg_signal_backend from more superuser backend types.
- 3a9b18b30953 17.0 cited