1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +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:33 -04:00
parent fcd7fe55c5
commit d9e1ea4de8
3 changed files with 2 additions and 27 deletions

View File

@ -386,30 +386,6 @@ GetCurrentTransactionIdIfAny(void)
return CurrentTransactionState->transactionId;
}
/*
* GetStableLatestTransactionId
*
* Get the XID once and then return same value for rest of transaction.
* Acts as a useful reference point for maintenance tasks.
*/
TransactionId
GetStableLatestTransactionId(void)
{
static LocalTransactionId lxid = InvalidLocalTransactionId;
static TransactionId stablexid = InvalidTransactionId;
if (lxid != MyProc->lxid)
{
lxid = MyProc->lxid;
stablexid = GetTopTransactionIdIfAny();
if (!TransactionIdIsValid(stablexid))
stablexid = ReadNewTransactionId();
}
Assert(TransactionIdIsValid(stablexid));
return stablexid;
}
/*
* AssignTransactionId