]> granicus.if.org Git - postgresql/commit
Change the way that LWLocks for extensions are allocated.
authorRobert Haas <rhaas@postgresql.org>
Thu, 4 Feb 2016 21:43:04 +0000 (16:43 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 4 Feb 2016 21:43:04 +0000 (16:43 -0500)
commitc1772ad9225641c921545b35c84ee478c326b95e
tree879865789b951bddfe02131401c7035be44780a6
parent5ef244a28266ce8e5666b23baed33a4c238542ff
Change the way that LWLocks for extensions are allocated.

The previous RequestAddinLWLocks() method had several disadvantages.
First, the locks would be in the main tranche; we've recently decided
that it's useful for LWLocks used for separate purposes to have
separate tranche IDs.  Second, there wasn't any correlation between
what code called RequestAddinLWLocks() and what code called
LWLockAssign(); when multiple modules are in use, it could become
quite difficult to troubleshoot problems where LWLockAssign() ran out
of locks.  To fix, create a concept of named LWLock tranches which
can be used either by extension or by core code.

Amit Kapila and Robert Haas
contrib/pg_stat_statements/pg_stat_statements.c
doc/src/sgml/xfunc.sgml
src/backend/postmaster/postmaster.c
src/backend/storage/lmgr/lwlock.c
src/include/pg_config_manual.h
src/include/storage/lwlock.h
src/tools/pgindent/typedefs.list