Re: pg_prepared_xacts returns transactions that are foreign to the caller - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: pg_prepared_xacts returns transactions that are foreign to the caller
Date
Msg-id 4C0DB4B1-489C-4804-83CA-B8EAB2247107@yandex-team.ru
Whole thread Raw
In response to pg_prepared_xacts returns transactions that are foreign to the caller  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-hackers

> On 20 Nov 2024, at 12:48, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>
> "select * from pg_prepared_xacts" might produce transactions created by a different user, so the caller won't be able
toissue "commit prepared". 
>
> I think there should be a view that returns only the transactions that the caller can commit or rollback.
> Is it something that can be implemented at the backend?

Like "select * from pg_prepared_xacts where pg_has_role(current_user, owner, 'member');"?


Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: RFC: Additional Directory for Extensions
Next
From: Daniel Gustafsson
Date:
Subject: Re: A way to build PSQL 17.1 source on AIX platform