Use an LWLock instead of a spinlock in waitlsn.c
authorAlexander Korotkov <akorotkov@postgresql.org>
Sat, 6 Apr 2024 21:31:43 +0000 (00:31 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Sat, 6 Apr 2024 21:49:53 +0000 (00:49 +0300)
commit25f42429e2ff2acca35c9154fc2e36b75c79227a
treea007e1ef361c34cef94c12d8e49bb2e3a2966928
parent1577081e9614345534a018e788a2c0bab4da4dc5
Use an LWLock instead of a spinlock in waitlsn.c

This should prevent busy-waiting when number of waiting processes is high.

Discussion: https://postgr.es/m/202404030658.hhj3vfxeyhft%40alvherre.pgsql
Author: Alvaro Herrera
src/backend/commands/waitlsn.c
src/backend/utils/activity/wait_event_names.txt
src/include/commands/waitlsn.h
src/include/storage/lwlocklist.h