Convert pg_stat_statements to use the new shmem allocation functions
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Author:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2026-04-05T23:12:53Z
Releases:
19 (unreleased)
Convert pg_stat_statements to use the new shmem allocation functions As part of this, embed the LWLock it needs in the shared memory struct itself, so that we don't need to use RequestNamedLWLockTranche() anymore. LWLockNewTrancheId() + LWLockInitialize() is more convenient to use in extensions. 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
| Path | Change | +/− |
|---|---|---|
| contrib/pg_stat_statements/pg_stat_statements.c | modified | +77 −96 |
Discussion
- Better shared data structure management and resizable shared data structures 87 messages · 2026-02-13 → 2026-06-15