aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2025-02-17 04:19:01 +0200
committerAlexander Korotkov <akorotkov@postgresql.org>2025-02-17 04:25:29 +0200
commit6a2275b8953a4462d44daf001bdd60b3d48f0946 (patch)
treeaf1ae24663b9ebe674e77e981b48ea101ee4e596 /src/backend/commands/explain.c
parentfbc0fe9a2efeb6172f93ad74a9656fdac5de2507 (diff)
downloadpostgresql-6a2275b8953a4462d44daf001bdd60b3d48f0946.tar.gz
postgresql-6a2275b8953a4462d44daf001bdd60b3d48f0946.zip
Get rid of WALBufMappingLock
Allow multiple backends to initialize WAL buffers concurrently. This way `MemSet((char *) NewPage, 0, XLOG_BLCKSZ);` can run in parallel without taking a single LWLock in exclusive mode. The new algorithm works as follows: * reserve a page for initialization using XLogCtl->InitializeReserved, * ensure the page is written out, * once the page is initialized, try to advance XLogCtl->InitializedUpTo and signal to waiters using XLogCtl->InitializedUpToCondVar condition variable, * repeat previous steps until we reserve initialization up to the target WAL position, * wait until concurrent initialization finishes using a XLogCtl->InitializedUpToCondVar. Now, multiple backends can, in parallel, concurrently reserve pages, initialize them, and advance XLogCtl->InitializedUpTo to point to the latest initialized page. Author: Yura Sokolov <y.sokolov@postgrespro.ru> Co-authored-by: Alexander Korotkov <aekorotkov@gmail.com> Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>
Diffstat (limited to 'src/backend/commands/explain.c')
0 files changed, 0 insertions, 0 deletions