aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/parallel.c
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2024-10-25 00:18:32 +0900
committerFujii Masao <fujii@postgresql.org>2024-10-25 00:18:32 +0900
commit86c30cef4a4cae951b2c30f1790fd5a7b81a2946 (patch)
treecc765705c2dea41ff8e7b9896bce3c2126e5101f /src/backend/access/transam/parallel.c
parent45188c2ea2391b7b24039e1632c726e2fc6b8008 (diff)
downloadpostgresql-86c30cef4a4cae951b2c30f1790fd5a7b81a2946.tar.gz
postgresql-86c30cef4a4cae951b2c30f1790fd5a7b81a2946.zip
Refactor GetLockStatusData() to skip backends/groups without fast-path locks.
Previously, GetLockStatusData() checked all slots for every backend to gather fast-path lock data, which could be inefficient. This commit refactors it by skipping backends with PID=0 (since they don't hold fast-path locks) and skipping groups with no registered fast-path locks, improving efficiency. This refactoring is particularly beneficial, for example when max_connections and max_locks_per_transaction are set high, as it reduces unnecessary checks across numerous slots. Author: Fujii Masao Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/a0a00c44-31e9-4c67-9846-fb9636213ac9@oss.nttdata.com
Diffstat (limited to 'src/backend/access/transam/parallel.c')
0 files changed, 0 insertions, 0 deletions