Re: Honor inherited ownership when finishing prepared transactions

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Honor inherited ownership when finishing prepared transactions
Date: 2026-11-11 06:49:37
Message-ID: 6FA1A011-6556-4CFF-969F-920AF0DF3417@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Kirill,

I verified that a blocked role check does not hold TwoPhaseStateLock.
After cancellation, another session can still finish the prepared
transaction. So the problem I expected seems to be solved.

On 9 Nov 2026, Kirill Reshke wrote:
> SET ROLE regress_prepare_setonly;
> SET ROLE regress_prepare_owner;

session_user is still the regression superuser, so the second SET ROLE
does not check the member's SET permission.
Maybe use SET SESSION AUTHORIZATION instead?

Thank you!

Best regards, Andrey Borodin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2026-11-11 07:08:24 Re: Wrong results with initplans moved by setrefs.c
Previous Message Fujii Masao 2026-11-11 06:46:58 Re: [PATCH] Fix two client-side NULL dereferences on malformed result sets (libpq, pg_receivewal)