1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-29 23:43:17 +03:00

Revert back-branch changes in behavior of age(xid).

Per discussion, it does not seem like a good idea to change the behavior of
age(xid) in a minor release, even though the old definition causes the
function to fail on hot standby slaves.  Therefore, revert commit
5829387381 and follow-on commits in the back
branches only.
This commit is contained in:
Tom Lane
2012-05-31 11:12:26 -04:00
parent 56901beb80
commit 3dfaea4727
3 changed files with 2 additions and 27 deletions

View File

@@ -87,13 +87,13 @@ xideq(PG_FUNCTION_ARGS)
}
/*
* xid_age - compute age of an XID (relative to latest stable xid)
* xid_age - compute age of an XID (relative to current xact)
*/
Datum
xid_age(PG_FUNCTION_ARGS)
{
TransactionId xid = PG_GETARG_TRANSACTIONID(0);
TransactionId now = GetStableLatestTransactionId();
TransactionId now = GetTopTransactionId();
/* Permanent XIDs are always infinitely old */
if (!TransactionIdIsNormal(xid))