mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08: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:
parent
796d1e889f
commit
1e29e6324c
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user