Re: Prepared transactions vs novice DBAs, again - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: Prepared transactions vs novice DBAs, again
Date
Msg-id d7ca856520a34396a43a36c574e7929b@biglumber.com
Whole thread Raw
In response to Re: Prepared transactions vs novice DBAs, again  (Bernd Helmle <mailings@oopsware.de>)
List 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@turnstep.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-----




pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Serializable Isolation without blocking
Next
From: Tom Lane
Date:
Subject: Re: windows doesn't notice backend death