Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3ab8cf9

Browse files
committed
Remove GlobalVisTestNonRemovable[Full]Horizon, not used anymore
GlobalVisTestNonRemovableHorizon() was only used for the implementation ofsnapshot_too_old, which was removed inf691f5b. As usingGlobalVisTestNonRemovableHorizon() is not particularly efficient, no new usesfor it should be added. Therefore remove.Discussion:https://postgr.es/m/20240415185720.q4dg4dlcyvvrabz4@awork3.anarazel.de
1 parent0c2f555 commit3ab8cf9

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

‎src/backend/storage/ipc/procarray.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4262,36 +4262,6 @@ GlobalVisTestIsRemovableXid(GlobalVisState *state, TransactionId xid)
42624262
returnGlobalVisTestIsRemovableFullXid(state,fxid);
42634263
}
42644264

4265-
/*
4266-
* Return FullTransactionId below which all transactions are not considered
4267-
* running anymore.
4268-
*
4269-
* Note: This is less efficient than testing with
4270-
* GlobalVisTestIsRemovableFullXid as it likely requires building an accurate
4271-
* cutoff, even in the case all the XIDs compared with the cutoff are outside
4272-
* [maybe_needed, definitely_needed).
4273-
*/
4274-
FullTransactionId
4275-
GlobalVisTestNonRemovableFullHorizon(GlobalVisState*state)
4276-
{
4277-
/* acquire accurate horizon if not already done */
4278-
if (GlobalVisTestShouldUpdate(state))
4279-
GlobalVisUpdate();
4280-
4281-
returnstate->maybe_needed;
4282-
}
4283-
4284-
/* Convenience wrapper around GlobalVisTestNonRemovableFullHorizon */
4285-
TransactionId
4286-
GlobalVisTestNonRemovableHorizon(GlobalVisState*state)
4287-
{
4288-
FullTransactionIdcutoff;
4289-
4290-
cutoff=GlobalVisTestNonRemovableFullHorizon(state);
4291-
4292-
returnXidFromFullTransactionId(cutoff);
4293-
}
4294-
42954265
/*
42964266
* Convenience wrapper around GlobalVisTestFor() and
42974267
* GlobalVisTestIsRemovableFullXid(), see their comments.

‎src/include/utils/snapmgr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ typedef struct GlobalVisState GlobalVisState;
107107
externGlobalVisState*GlobalVisTestFor(Relationrel);
108108
externboolGlobalVisTestIsRemovableXid(GlobalVisState*state,TransactionIdxid);
109109
externboolGlobalVisTestIsRemovableFullXid(GlobalVisState*state,FullTransactionIdfxid);
110-
externFullTransactionIdGlobalVisTestNonRemovableFullHorizon(GlobalVisState*state);
111-
externTransactionIdGlobalVisTestNonRemovableHorizon(GlobalVisState*state);
112110
externboolGlobalVisCheckRemovableXid(Relationrel,TransactionIdxid);
113111
externboolGlobalVisCheckRemovableFullXid(Relationrel,FullTransactionIdfxid);
114112

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp