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

Commit368d827

Browse files
committed
Rename two functions that wake up other processes
Instead of talking about setting latches, which is a pretty low-levelmechanism, emphasize that they wake up other processes.This is in preparation for replacing Latches with a new abstraction.That's still work in progress, but this seems a little tidier anyway,so let's get this refactoring out of the way already.Discussion:https://www.postgresql.org/message-id/391abe21-413e-4d91-a650-b663af49500c%40iki.fi
1 parenta9c546a commit368d827

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6178,7 +6178,7 @@ StartupXLOG(void)
61786178
* Wake up all waiters for replay LSN. They need to report an error that
61796179
* recovery was ended before reaching the target LSN.
61806180
*/
6181-
WaitLSNSetLatches(InvalidXLogRecPtr);
6181+
WaitLSNWakeup(InvalidXLogRecPtr);
61826182

61836183
/*
61846184
* Shutdown the recovery environment. This must occur after
@@ -7303,7 +7303,7 @@ CreateCheckPoint(int flags)
73037303
* until after the above call that flushes the XLOG_CHECKPOINT_ONLINE
73047304
* record.
73057305
*/
7306-
SetWalSummarizerLatch();
7306+
WakeupWalSummarizer();
73077307

73087308
/*
73097309
* Let smgr do post-checkpoint cleanup (eg, deleting old files).

‎src/backend/access/transam/xlogrecovery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,7 @@ PerformWalRecovery(void)
18371837
if (waitLSNState&&
18381838
(XLogRecoveryCtl->lastReplayedEndRecPtr >=
18391839
pg_atomic_read_u64(&waitLSNState->minWaitedLSN)))
1840-
WaitLSNSetLatches(XLogRecoveryCtl->lastReplayedEndRecPtr);
1840+
WaitLSNWakeup(XLogRecoveryCtl->lastReplayedEndRecPtr);
18411841

18421842
/* Else, try to fetch the next WAL record */
18431843
record=ReadRecord(xlogprefetcher,LOG, false,replayTLI);

‎src/backend/access/transam/xlogwait.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ deleteLSNWaiter(void)
151151
* and set latches for all waiters.
152152
*/
153153
void
154-
WaitLSNSetLatches(XLogRecPtrcurrentLSN)
154+
WaitLSNWakeup(XLogRecPtrcurrentLSN)
155155
{
156156
inti;
157157
ProcNumber*wakeUpProcs;

‎src/backend/postmaster/walsummarizer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,15 +626,15 @@ GetOldestUnsummarizedLSN(TimeLineID *tli, bool *lsn_is_exact)
626626
}
627627

628628
/*
629-
*Attempt to setthe WAL summarizer's latch.
629+
*Wake upthe WAL summarizer process.
630630
*
631631
* This might not work, because there's no guarantee that the WAL summarizer
632632
* process was successfully started, and it also might have started but
633633
* subsequently terminated. So, under normal circumstances, this will get the
634634
* latch set, but there's no guarantee.
635635
*/
636636
void
637-
SetWalSummarizerLatch(void)
637+
WakeupWalSummarizer(void)
638638
{
639639
ProcNumberpgprocno;
640640

‎src/include/access/xlogwait.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ extern PGDLLIMPORT WaitLSNState *waitLSNState;
8282

8383
externSizeWaitLSNShmemSize(void);
8484
externvoidWaitLSNShmemInit(void);
85-
externvoidWaitLSNSetLatches(XLogRecPtrcurrentLSN);
85+
externvoidWaitLSNWakeup(XLogRecPtrcurrentLSN);
8686
externvoidWaitLSNCleanup(void);
8787
externWaitLSNResultWaitForLSNReplay(XLogRecPtrtargetLSN,int64timeout);
8888

‎src/include/postmaster/walsummarizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern void GetWalSummarizerState(TimeLineID *summarized_tli,
2929
int*summarizer_pid);
3030
externXLogRecPtrGetOldestUnsummarizedLSN(TimeLineID*tli,
3131
bool*lsn_is_exact);
32-
externvoidSetWalSummarizerLatch(void);
32+
externvoidWakeupWalSummarizer(void);
3333
externvoidWaitForWalSummarization(XLogRecPtrlsn);
3434

3535
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp