mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Remove useless 'needlock' argument from GetXLogInsertRecPtr. It was always
passed as 'true'.
This commit is contained in:
@ -9411,16 +9411,14 @@ GetStandbyFlushRecPtr(void)
|
||||
* Get latest WAL insert pointer
|
||||
*/
|
||||
XLogRecPtr
|
||||
GetXLogInsertRecPtr(bool needlock)
|
||||
GetXLogInsertRecPtr(void)
|
||||
{
|
||||
XLogCtlInsert *Insert = &XLogCtl->Insert;
|
||||
XLogRecPtr current_recptr;
|
||||
|
||||
if (needlock)
|
||||
LWLockAcquire(WALInsertLock, LW_SHARED);
|
||||
LWLockAcquire(WALInsertLock, LW_SHARED);
|
||||
INSERT_RECPTR(current_recptr, Insert, Insert->curridx);
|
||||
if (needlock)
|
||||
LWLockRelease(WALInsertLock);
|
||||
LWLockRelease(WALInsertLock);
|
||||
|
||||
return current_recptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user