diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-02-22 01:21:34 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-02-22 01:21:34 +0200 |
commit | 28f3915b73f75bd1b50ba070f56b34241fe53fd1 (patch) | |
tree | 10d305f3f98af6cfae7d683ce9b13c449d8e8796 /src/backend/access/transam/xlog.c | |
parent | 4989ce72644b9d636b9b23c7a1719a405e62670b (diff) | |
download | postgresql-28f3915b73f75bd1b50ba070f56b34241fe53fd1.tar.gz postgresql-28f3915b73f75bd1b50ba070f56b34241fe53fd1.zip |
Remove superfluous 'pgprocno' field from PGPROC
It was always just the index of the PGPROC entry from the beginning of
the proc array. Introduce a macro to compute it from the pointer
instead.
Reviewed-by: Andres Freund
Discussion: https://www.postgresql.org/message-id/8171f1aa-496f-46a6-afc3-c46fe7a9b407@iki.fi
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 50c347a6795..c1162d55bff 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -1379,7 +1379,7 @@ WALInsertLockAcquire(void) static int lockToTry = -1; if (lockToTry == -1) - lockToTry = MyProc->pgprocno % NUM_XLOGINSERT_LOCKS; + lockToTry = MyProcNumber % NUM_XLOGINSERT_LOCKS; MyLockNo = lockToTry; /* |