Hi Andrey,

My purview is absolutely influenced from "long running transactions" which
are essentially killed by pg itself through idle_session_timeout. This also
happens when the user sets an acceptable value to this timeout and the user
is aware that transactions can be killed if threshold is exceeded, which
further can be confirmed through logs.

The same analogy is being applied with orphaned prepared transactions,
which may/may not complete ever , but going to hinder autovacuum,
increasing bloat. When user sets the value, user will be aware that the
prepared transactions can disappear automatically.



On Wed, Mar 25, 2026 at 2:36 PM Andrey Borodin <[email protected]> wrote:

>
>
> > On 23 Mar 2026, at 16:47, Nikhil Chawla <[email protected]>
> wrote:
> >
> > idle_in_transaction_session_timeout, idle_session_timeout,
> statement_timeout, but no equivalent for prepared transactions
>
> During implementation of the transaction_timeout we briefly considered
> prepared xacts, but decided that it's a footgun.
>
> DBA can easily do the same with a cron job, but in case of prepared
> transactions monitoring is crucial. Prepared xacts are used to coordinate
> commit in many durable systems and orphan prepared xact is evidence of
> serious malfunction.
>
> Silent rollback in any scenario I can imagine is a disaster.
>
>
> Best regards, Andrey Borodin.



-- 
Regards,
Nikhil Chawla
Twitter <https://twitter.com/chawlanikhil24> | LinkedIn
<http://linkedin.com/in/chawlanikhil24>

Reply via email to