pgsql: Convert pg_stat_statements to use the new shmem allocation funct

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Convert pg_stat_statements to use the new shmem allocation funct
Date: 2026-04-05 23:27:43
Message-ID: E1w9WsZ-00399x-0F@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)bapat(dot)oss(at)gmail(dot)com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Discussion: https://www.postgresql.org/message-id/CAExHW5vM1bneLYfg0wGeAa=52UiJ3z4vKd3AJ72X8Fw6k3KKrg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d4885af3d65325c1fcd319e98c634fde9a200443

Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c | 173 +++++++++++-------------
1 file changed, 77 insertions(+), 96 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-04-05 23:27:44 pgsql: Convert buffer manager to use the new shmem allocation functions
Previous Message Andres Freund 2026-04-05 23:11:55 pgsql: instrumentation: Separate per-node logic from other uses