pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Revert: Get rid of WALBufMappingLock
3+ messages / 1 participants
[nested] [flat]

* pgsql: Revert: Get rid of WALBufMappingLock
@ 2025-02-17 10:40  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alexander Korotkov @ 2025-02-17 10:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Revert: Get rid of WALBufMappingLock

This commit reverts 6a2275b895.  Buildfarm failure on batta spots some
concurrency issue, which requires further investigation.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3fb58625d18fd226cb929c9700d0db72ac92c075

Modified Files
--------------
src/backend/access/transam/xlog.c               | 176 +++++++-----------------
src/backend/utils/activity/wait_event_names.txt |   2 +-
src/include/storage/lwlocklist.h                |   2 +-
3 files changed, 48 insertions(+), 132 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Revert "Get rid of WALBufMappingLock"
@ 2025-08-22 16:31  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alexander Korotkov @ 2025-08-22 16:31 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Revert "Get rid of WALBufMappingLock"

This reverts commit bc22dc0e0ddc2dcb6043a732415019cc6b6bf683.
It appears that conditional variables are not suitable for use inside
critical sections.  If WaitLatch()/WaitEventSetWaitBlock() face postmaster
death, they exit, releasing all locks instead of PANIC.  In certain
situations, this leads to data corruption.

Reported-by: Andrey Borodin <x4mmm@yandex-team.ru>
Discussion: https://postgr.es/m/B3C69B86-7F82-4111-B97F-0005497BB745%40yandex-team.ru
Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru>
Reviewed-by: Aleksander Alekseev <aleksander@tigerdata.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Yura Sokolov <y.sokolov@postgrespro.ru>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Backpatch-through: 18

Branch
------
master

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

Modified Files
--------------
src/backend/access/transam/xlog.c               | 234 +++++-------------------
src/backend/utils/activity/wait_event_names.txt |   2 +-
src/include/storage/lwlocklist.h                |   2 +-
3 files changed, 49 insertions(+), 189 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Revert "Get rid of WALBufMappingLock"
@ 2025-08-22 16:32  Alexander Korotkov <akorotkov@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alexander Korotkov @ 2025-08-22 16:32 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Revert "Get rid of WALBufMappingLock"

This reverts commit bc22dc0e0ddc2dcb6043a732415019cc6b6bf683.
It appears that conditional variables are not suitable for use inside
critical sections.  If WaitLatch()/WaitEventSetWaitBlock() face postmaster
death, they exit, releasing all locks instead of PANIC.  In certain
situations, this leads to data corruption.

Reported-by: Andrey Borodin <x4mmm@yandex-team.ru>
Discussion: https://postgr.es/m/B3C69B86-7F82-4111-B97F-0005497BB745%40yandex-team.ru
Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru>
Reviewed-by: Aleksander Alekseev <aleksander@tigerdata.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Yura Sokolov <y.sokolov@postgrespro.ru>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2ce6abdf50857d3564cc1ef701e7f1095fbfb438

Modified Files
--------------
src/backend/access/transam/xlog.c               | 234 +++++-------------------
src/backend/utils/activity/wait_event_names.txt |   2 +-
src/include/storage/lwlocklist.h                |   2 +-
3 files changed, 49 insertions(+), 189 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-08-22 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-02-17 10:40 pgsql: Revert: Get rid of WALBufMappingLock Alexander Korotkov <akorotkov@postgresql.org>
2025-08-22 16:31 pgsql: Revert "Get rid of WALBufMappingLock" Alexander Korotkov <akorotkov@postgresql.org>
2025-08-22 16:32 pgsql: Revert "Get rid of WALBufMappingLock" Alexander Korotkov <akorotkov@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox