Refactor shmem initialization code in predicate.c

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 4c9eca5afea0e8623e39f6a778412d4da687f659
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2026-04-05T23:13:01Z
Refactor shmem initialization code in predicate.c

This is in preparation to convert it to use the new shmem allocation
functions, making the next commit that does that smaller. This inlines
SerialInit() to the caller, and moves all the initialization steps
within PredicateLockShmemInit() to happen after all the
ShmemInit{Struct|Hash}() calls.

Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://www.postgresql.org/message-id/CAExHW5vM1bneLYfg0wGeAa=52UiJ3z4vKd3AJ72X8Fw6k3KKrg@mail.gmail.com

Files

PathChange+/−
src/backend/storage/lmgr/predicate.c modified +98 −119

Discussion