mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +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:
parent
796d1e889f
commit
1e29e6324c
@ -7862,13 +7862,11 @@ GetInsertRecPtr(void)
|
|||||||
XLogRecPtr
|
XLogRecPtr
|
||||||
GetFlushRecPtr(void)
|
GetFlushRecPtr(void)
|
||||||
{
|
{
|
||||||
XLogRecPtr recptr;
|
|
||||||
|
|
||||||
SpinLockAcquire(&XLogCtl->info_lck);
|
SpinLockAcquire(&XLogCtl->info_lck);
|
||||||
recptr = XLogCtl->LogwrtResult.Flush;
|
LogwrtResult = XLogCtl->LogwrtResult;
|
||||||
SpinLockRelease(&XLogCtl->info_lck);
|
SpinLockRelease(&XLogCtl->info_lck);
|
||||||
|
|
||||||
return recptr;
|
return LogwrtResult.Flush;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user