Commit 1e29e632 authored by Simon Riggs's avatar Simon Riggs

Maintain local LogwrtResult consistently

Teach GetFlushRecPtr() to update LogwrtResult cache as performed by all other
functions in xlog.c
parent 796d1e88
...@@ -7862,13 +7862,11 @@ GetInsertRecPtr(void) ...@@ -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;
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment