postgresql/src/backend
Alexander Korotkov c13070a27b Revert "Get rid of WALBufMappingLock"
This reverts commit bc22dc0e0d.
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
2025-08-22 19:26:38 +03:00
..
access Revert "Get rid of WALBufMappingLock" 2025-08-22 19:26:38 +03:00
archive Update copyright for 2025 2025-01-01 11:21:55 -05:00
backup Expand usage of macros for protocol characters. 2025-08-06 13:37:00 -05:00
bootstrap Add new OID alias type regdatabase. 2025-06-30 15:38:54 -05:00
catalog Change dynahash.c and hsearch.h to use int64 instead of long 2025-08-22 11:59:02 +09:00
commands Reduce lock level for ALTER DOMAIN ... VALIDATE CONSTRAINT 2025-08-22 08:56:11 +02:00
executor Fix re-execution of a failed SQLFunctionCache entry. 2025-08-20 16:09:18 -04:00
foreign Track the number of presorted outer pathkeys in MergePath 2025-05-08 18:21:32 +09:00
jit Don't put library-supplied -L/-I switches before user-supplied ones. 2025-07-29 15:17:40 -04:00
lib Correct list of files in src/backend/lib/README 2025-06-27 09:31:23 +09:00
libpq Silence Valgrind leakage complaints in more-or-less-hackish ways. 2025-08-02 21:59:46 -04:00
main Force LC_COLLATE to C in postmaster. 2025-07-16 14:13:18 -07:00
nodes Add Asserts to validate prevbit values in bms_prev_member 2025-08-15 16:33:07 +12:00
optimizer Simplify relation_has_unique_index_for() 2025-08-19 09:37:04 +09:00
parser Grab the low-hanging fruit from forcing USE_FLOAT8_BYVAL to true. 2025-08-13 17:18:22 -04:00
partitioning Avoid leakage of zero-length arrays in partition_bounds_copy(). 2025-08-02 21:59:46 -04:00
po Translation updates 2025-05-05 12:04:49 +02:00
port Don't treat EINVAL from semget() as a hard failure. 2025-08-13 12:00:03 -04:00
postmaster Disallow server start with sync_replication_slots = on and wal_level < logical. 2025-08-21 22:18:11 +09:00
regex Control ctype behavior internally with a method table. 2025-07-01 07:44:47 -07:00
replication Fix assertion failure with replication slot release in single-user mode 2025-08-20 15:00:04 +09:00
rewrite Grab the low-hanging fruit from forcing USE_FLOAT8_BYVAL to true. 2025-08-13 17:18:22 -04:00
snowball Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
statistics Fix security checks in selectivity estimation functions. 2025-08-11 09:03:11 +01:00
storage Change dynahash.c and hsearch.h to use int64 instead of long 2025-08-22 11:59:02 +09:00
tcop Fix assorted pretty-trivial memory leaks in the backend. 2025-08-02 21:59:46 -04:00
tsearch Remove useless/superfluous Datum conversions 2025-08-08 22:06:57 +02:00
utils Revert "Get rid of WALBufMappingLock" 2025-08-22 19:26:38 +03:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile aio: Add liburing dependency 2025-03-26 19:45:32 -04:00
meson.build meson: add and use stamp files for generated headers 2025-08-11 15:18:23 -04:00
nls.mk Return yyparse() result not via global variable 2025-01-24 06:55:39 +01:00