Re: Prepared transactions vs novice DBAs, again

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: mailings(at)oopsware(dot)de
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Prepared transactions vs novice DBAs, again
Date: 2009-05-05 15:56:18
Message-ID: d7ca856520a34396a43a36c574e7929b@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> 1 seconds seems a very low default for me. I can imagine that most
> distributed transactions are taking longer than this to complete.

One second means it is set by default to catch *all* prepared
transactions. It's simply checking how long the transaction has
been open via:

SELECT database, ROUND(EXTRACT(epoch FROM now()-prepared)), prepared
FROM pg_prepared_xacts ORDER BY prepared ASC;

If you *are* using prepared transactions (which most people are not),
you would want to set a specific number for your environment -
and certainly more than 1 second (perhaps 5 minutes?) At that point,
the check changes from "has anybody mistakenly created a prepared
transaction" to "has one of our prepared transactions been open
too long?"

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
End Point Corporation
PGP Key: 0x14964AC8 200905051154
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkoAYaEACgkQvJuQZxSWSsgYqACgvQOPJKMpDAIdSuGIGjvqrkxO
XA8AoKraljUOgV7JrFlv2dJR/T/IJ1iv
=QMWI
-----END PGP SIGNATURE-----

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-05-05 15:57:12 Re: windows doesn't notice backend death
Previous Message Kevin Grittner 2009-05-05 15:50:22 Serializable Isolation without blocking