Remove superfluous 'pgprocno' field from PGPROC
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 21 Feb 2024 23:21:34 +0000 (01:21 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 21 Feb 2024 23:21:34 +0000 (01:21 +0200)
commit28f3915b73f75bd1b50ba070f56b34241fe53fd1
tree10d305f3f98af6cfae7d683ce9b13c449d8e8796
parent4989ce72644b9d636b9b23c7a1719a405e62670b
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
14 files changed:
src/backend/access/transam/clog.c
src/backend/access/transam/twophase.c
src/backend/access/transam/xlog.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/pgarch.c
src/backend/postmaster/walsummarizer.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/ipc/procarray.c
src/backend/storage/lmgr/condition_variable.c
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/predicate.c
src/backend/storage/lmgr/proc.c
src/include/storage/lock.h
src/include/storage/proc.h