Re: [PATCH] Add prepared_orphaned_transaction_timeout GUC - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: [PATCH] Add prepared_orphaned_transaction_timeout GUC
Date
Msg-id CAKAnmmJs-N7u2aRXPo5cqm9jXjmKqSNQcTrPs9dOm=cuT0hS1w@mail.gmail.com
Whole thread
In response to Re: [PATCH] Add prepared_orphaned_transaction_timeout GUC  (Artur Zakirov <zaartur@gmail.com>)
List pgsql-hackers
On Mon, Mar 30, 2026 at 6:44 AM Artur Zakirov <zaartur@gmail.com> wrote:
It seems we don't have ways to enforce this rule, and a user doesn't need to have advanced privileges to run PREPARE TRANSACTION. Correct me if I'm wrong. What if instead of adding a GUC we would add a new role, only this role (and superuser) will be able to run PREPARE TRANSACTION.

Well, it is certainly a better solution than a global timeout. But there are a ton of other ways that a user can mess things up. 2PC is very powerful, and very hard to get implement. It is disabled by default for good reason. Someone enabling it needs to have all their ducks in a row, and should have their own ways to monitor, and handle, errant transactions. So a strong -1 from me on the timeout, and a weak -1 on a GUC/permission solution (which could get hashed out more, perhaps).

Cheers,
Greg

pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: AIO / read stream heuristics adjustments for index prefetching
Next
From: Thomas Munro
Date:
Subject: Re: Change default of jit to off