pgsql: Use LW_SHARED in dsa.c where possible. - Mailing list pgsql-committers

From Nathan Bossart
Subject pgsql: Use LW_SHARED in dsa.c where possible.
Date
Msg-id E1vQZ39-002Uru-1g@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Use LW_SHARED in dsa.c where possible.

Both dsa_get_total_size() and dsa_get_total_size_from_handle() take
an exclusive lock just to read a variable.  This commit reduces the
lock level to LW_SHARED in those functions.

Reviewed-by: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/aS8fMzWs9e8iHxk2%40nathan

Branch
------
master

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

Modified Files
--------------
src/backend/utils/mmgr/dsa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix amcheck's handling of half-dead B-tree pages
Next
From: Amit Kapila
Date:
Subject: pgsql: Fix shadow variable warning in subscriptioncmds.c.