mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Maintain local LogwrtResult consistently
Teach GetFlushRecPtr() to update LogwrtResult cache as performed by all other functions in xlog.c
This commit is contained in:
@ -7862,13 +7862,11 @@ GetInsertRecPtr(void)
|
||||
XLogRecPtr
|
||||
GetFlushRecPtr(void)
|
||||
{
|
||||
XLogRecPtr recptr;
|
||||
|
||||
SpinLockAcquire(&XLogCtl->info_lck);
|
||||
recptr = XLogCtl->LogwrtResult.Flush;
|
||||
LogwrtResult = XLogCtl->LogwrtResult;
|
||||
SpinLockRelease(&XLogCtl->info_lck);
|
||||
|
||||
return recptr;
|
||||
return LogwrtResult.Flush;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user