Re: [PATCH] Add prepared_orphaned_transaction_timeout GUC

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: zaartur(at)gmail(dot)com
Cc: Nikhil Chawla <chawlanikhil24(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Add prepared_orphaned_transaction_timeout GUC
Date: 2026-04-02 12:34:23
Message-ID: CAKAnmmJs-N7u2aRXPo5cqm9jXjmKqSNQcTrPs9dOm=cuT0hS1w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 30, 2026 at 6:44 AM Artur Zakirov <zaartur(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2026-04-02 12:50:30 Re: Change default of jit to off
Previous Message Nazir Bilal Yavuz 2026-04-02 12:30:26 Re: AIO / read stream heuristics adjustments for index prefetching