]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Align PGPROC to cache line boundary
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sun, 22 Feb 2026 11:13:43 +0000 (13:13 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sun, 22 Feb 2026 11:13:43 +0000 (13:13 +0200)
commit412f78c66eedbe9cf41a657f4566d86a69ab7af2
treeb002d6be70f1f75efb4f94a6abab7661ce1a6fcf
parent2e0853176f8f28a7684aa8b5af73446332960725
Align PGPROC to cache line boundary

On common architectures, the PGPROC struct happened to be a multiple
of 64 bytes on PG 18, but it's changed on 'master' since. There was
worry that changing the alignment might hurt performance, due to false
cacheline sharing across elements in the proc array. However, there
was no explicit alignment, so any alignment to cache lines was
accidental. Add explicit alignment to remove worry about false
sharing.

Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://www.postgresql.org/message-id/3dd6f70c-b94d-4428-8e75-74a7136396be@iki.fi
src/include/storage/proc.h