Re: Allow non-superuser to cancel superuser tasks.

From: "Leung, Anthony" <antholeu(at)amazon(dot)com>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow non-superuser to cancel superuser tasks.
Date: 2024-04-04 00:36:45
Message-ID: 34D6BD26-CE3D-44D8-9B93-08E7CF114C27@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Update - the condition should be &&

if (pgstat_get_backend_type(proc->backendId) == B_AUTOVAC_WORKER)
{
if (!has_privs_of_role(GetUserId(), ROLE_PG_SIGNAL_AUTOVACUUM) && !superuser())
return SIGNAL_BACKEND_NOAUTOVACUUM;
}

Thanks
--
Anthony Leung
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-04-04 00:55:07 Re: Silence Meson warning on HEAD
Previous Message Masahiko Sawada 2024-04-04 00:31:11 Re: Improve eviction algorithm in ReorderBuffer