Re: Allow non-superuser to cancel superuser tasks.

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, "Leung, Anthony" <antholeu(at)amazon(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-06-14 07:06:36
Message-ID: F9A78C39-464C-42B6-AC9E-481BEF66D7B4@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 13 Jun 2024, at 02:04, Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> I adjusted 0001 based on my upthread feedback.

This patch looks good to me. Spellchecker is complaining about “signaling” instead of “signalling”, but ISTM it’s OK.

I’ve tried to dig into the test.
The problem is CV is allocated in

inj_state = GetNamedDSMSegment("injection_points”,

which seems to be destroyed in

shmem_exit() calling dsm_backend_shutdown()

This happens before we broadcast that sleep is over.
I think this might happen with any wait on injection point if it is pg_terminate_backend()ed.

Is there way to wake up from CV sleep before processing actual termination?

Thanks!

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dominique Devienne 2024-06-14 07:16:25 Re: Improve the granularity of PQsocketPoll's timeout parameter?
Previous Message Amit Kapila 2024-06-14 07:03:48 Re: Logical Replication of sequences