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 <[email protected]>
Reviewed-by: Matthias van de Meent <[email protected]>
Reviewed-by: Daniel Gustafsson <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/CAExHW5vM1bneLYfg0wGeAa=52uij3z4vkd3aj72x8fw6k3k...@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(-)

Reply via email to