mirror of
https://github.com/postgres/postgres.git
synced 2025-05-29 00:03:09 -04:00
Remove GlobalVisTestNonRemovable[Full]Horizon, not used anymore
GlobalVisTestNonRemovableHorizon() was only used for the implementation of snapshot_too_old, which was removed in f691f5b80a8. As using GlobalVisTestNonRemovableHorizon() is not particularly efficient, no new uses for it should be added. Therefore remove. Discussion: https://postgr.es/m/20240415185720.q4dg4dlcyvvrabz4@awork3.anarazel.de
This commit is contained in:
parent
0c2f5552d5
commit
3ab8cf9275
@ -4262,36 +4262,6 @@ GlobalVisTestIsRemovableXid(GlobalVisState *state, TransactionId xid)
|
|||||||
return GlobalVisTestIsRemovableFullXid(state, fxid);
|
return GlobalVisTestIsRemovableFullXid(state, fxid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Return FullTransactionId below which all transactions are not considered
|
|
||||||
* running anymore.
|
|
||||||
*
|
|
||||||
* Note: This is less efficient than testing with
|
|
||||||
* GlobalVisTestIsRemovableFullXid as it likely requires building an accurate
|
|
||||||
* cutoff, even in the case all the XIDs compared with the cutoff are outside
|
|
||||||
* [maybe_needed, definitely_needed).
|
|
||||||
*/
|
|
||||||
FullTransactionId
|
|
||||||
GlobalVisTestNonRemovableFullHorizon(GlobalVisState *state)
|
|
||||||
{
|
|
||||||
/* acquire accurate horizon if not already done */
|
|
||||||
if (GlobalVisTestShouldUpdate(state))
|
|
||||||
GlobalVisUpdate();
|
|
||||||
|
|
||||||
return state->maybe_needed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Convenience wrapper around GlobalVisTestNonRemovableFullHorizon */
|
|
||||||
TransactionId
|
|
||||||
GlobalVisTestNonRemovableHorizon(GlobalVisState *state)
|
|
||||||
{
|
|
||||||
FullTransactionId cutoff;
|
|
||||||
|
|
||||||
cutoff = GlobalVisTestNonRemovableFullHorizon(state);
|
|
||||||
|
|
||||||
return XidFromFullTransactionId(cutoff);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convenience wrapper around GlobalVisTestFor() and
|
* Convenience wrapper around GlobalVisTestFor() and
|
||||||
* GlobalVisTestIsRemovableFullXid(), see their comments.
|
* GlobalVisTestIsRemovableFullXid(), see their comments.
|
||||||
|
@ -107,8 +107,6 @@ typedef struct GlobalVisState GlobalVisState;
|
|||||||
extern GlobalVisState *GlobalVisTestFor(Relation rel);
|
extern GlobalVisState *GlobalVisTestFor(Relation rel);
|
||||||
extern bool GlobalVisTestIsRemovableXid(GlobalVisState *state, TransactionId xid);
|
extern bool GlobalVisTestIsRemovableXid(GlobalVisState *state, TransactionId xid);
|
||||||
extern bool GlobalVisTestIsRemovableFullXid(GlobalVisState *state, FullTransactionId fxid);
|
extern bool GlobalVisTestIsRemovableFullXid(GlobalVisState *state, FullTransactionId fxid);
|
||||||
extern FullTransactionId GlobalVisTestNonRemovableFullHorizon(GlobalVisState *state);
|
|
||||||
extern TransactionId GlobalVisTestNonRemovableHorizon(GlobalVisState *state);
|
|
||||||
extern bool GlobalVisCheckRemovableXid(Relation rel, TransactionId xid);
|
extern bool GlobalVisCheckRemovableXid(Relation rel, TransactionId xid);
|
||||||
extern bool GlobalVisCheckRemovableFullXid(Relation rel, FullTransactionId fxid);
|
extern bool GlobalVisCheckRemovableFullXid(Relation rel, FullTransactionId fxid);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user