diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-01-11 11:00:53 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-01-11 11:01:47 +0200 |
commit | 1b9dea04b5cd8b1b2f8041e4aece9d573f007eb1 (patch) | |
tree | 66c32029400c0677271419ab1fa005d6d221495f /src/backend/access | |
parent | 9c808f89c2841dd847555898a8db45fcd69e913b (diff) | |
download | postgresql-1b9dea04b5cd8b1b2f8041e4aece9d573f007eb1.tar.gz postgresql-1b9dea04b5cd8b1b2f8041e4aece9d573f007eb1.zip |
Remove useless 'needlock' argument from GetXLogInsertRecPtr. It was always
passed as 'true'.
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/transam/xlog.c | 8 | ||||
-rw-r--r-- | src/backend/access/transam/xlogfuncs.c | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index db7d9930cb6..19ef66b5f82 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -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; } diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c index 1ca279de3ff..2e10d4d15f7 100644 --- a/src/backend/access/transam/xlogfuncs.c +++ b/src/backend/access/transam/xlogfuncs.c @@ -200,7 +200,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS) errmsg("recovery is in progress"), errhint("WAL control functions cannot be executed during recovery."))); - current_recptr = GetXLogInsertRecPtr(true); + current_recptr = GetXLogInsertRecPtr(); snprintf(location, sizeof(location), "%X/%X", current_recptr.xlogid, current_recptr.xrecoff); |