Maintain local LogwrtResult consistently

Teach GetFlushRecPtr() to update LogwrtResult cache as performed by all other
functions in xlog.c
This commit is contained in:
Simon Riggs 2016-01-12 07:33:20 +00:00
parent 796d1e889f
commit 1e29e6324c
1 changed files with 2 additions and 4 deletions

View File

@ -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;
}
/*