Use LW_SHARED in dsa.c where possible.

Nathan Bossart <nathan@postgresql.org>

Commit: a6d05c819380b0940fcfb428aa298f2d7e76e5c6
Author: Nathan Bossart <nathan@postgresql.org>
Date: 2025-12-02T22:40:23Z
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

Files

PathChange+/−
src/backend/utils/mmgr/dsa.c modified +2 −2

Discussion