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

Commit46d73e0

Browse files
committed
Remove unused function GetOldestWALSendPointer from walsender code.
That unused function was introduced as a sample because synchronousreplication or replication monitoring tools might need it in the future.Recently commit989be08 added the function SyncRepGetOldestSyncRecPtrwhich provides almost the same functionality for multiple synchronousstandbys feature. So it's time to remove that unused sample function.This commit does that.
1 parentf1f01de commit46d73e0

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

‎src/backend/replication/walsender.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2938,44 +2938,3 @@ WalSndKeepaliveIfNecessary(TimestampTz now)
29382938
WalSndShutdown();
29392939
}
29402940
}
2941-
2942-
/*
2943-
* This isn't currently used for anything. Monitoring tools might be
2944-
* interested in the future, and we'll need something like this in the
2945-
* future for synchronous replication.
2946-
*/
2947-
#ifdefNOT_USED
2948-
/*
2949-
* Returns the oldest Send position among walsenders. Or InvalidXLogRecPtr
2950-
* if none.
2951-
*/
2952-
XLogRecPtr
2953-
GetOldestWALSendPointer(void)
2954-
{
2955-
XLogRecPtroldest= {0,0};
2956-
inti;
2957-
boolfound= false;
2958-
2959-
for (i=0;i<max_wal_senders;i++)
2960-
{
2961-
WalSnd*walsnd=&WalSndCtl->walsnds[i];
2962-
XLogRecPtrrecptr;
2963-
2964-
if (walsnd->pid==0)
2965-
continue;
2966-
2967-
SpinLockAcquire(&walsnd->mutex);
2968-
recptr=walsnd->sentPtr;
2969-
SpinLockRelease(&walsnd->mutex);
2970-
2971-
if (recptr.xlogid==0&&recptr.xrecoff==0)
2972-
continue;
2973-
2974-
if (!found||recptr<oldest)
2975-
oldest=recptr;
2976-
found= true;
2977-
}
2978-
returnoldest;
2979-
}
2980-
2981-
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp