postgresql/src/backend
Tom Lane 3e383f9b68 Avoid trying to write an empty WAL record in log_newpage_range().
If the last few pages in the specified range are empty (all zero),
then log_newpage_range() could try to emit an empty WAL record
containing no FPIs.  This at least upsets an Assert in
ReserveXLogInsertLocation, and might perhaps have bad real-world
consequences in non-assert builds.

This has been broken since log_newpage_range() was introduced,
but the case was hard if not impossible to hit before commit 3d6a98457
decided it was okay to leave VM and FSM pages intentionally zero.
Nonetheless, it seems prudent to back-patch.  log_newpage_range()
was added in v12 but later back-patched, so this affects all
supported branches.

Matthias van de Meent, per report from Justin Pryzby

Discussion: https://postgr.es/m/ZD1daibg4RF50IOj@telsasoft.com
2023-04-17 14:22:26 -04:00
..
access Avoid trying to write an empty WAL record in log_newpage_range(). 2023-04-17 14:22:26 -04:00
archive Redesign archive modules 2023-02-17 14:26:42 +09:00
backup Support long distance matching for zstd compression 2023-04-06 17:18:42 +02:00
bootstrap Fix CREATE INDEX progress reporting for multi-level partitioning. 2023-03-25 15:34:03 -04:00
catalog doc: Add additional SQL features codes from SQL:2023 2023-04-17 16:06:41 +02:00
commands Revert "Catalog NOT NULL constraints" and fallout 2023-04-12 19:29:21 +02:00
executor Ensure result of an aggregate's finalfunc is made read-only. 2023-04-16 14:16:40 -04:00
foreign De-Revert "Add support for Kerberos credential delegation" 2023-04-13 08:55:07 -04:00
jit SQL/JSON: support the IS JSON predicate 2023-03-31 22:34:04 +02:00
lib Fix ILIST_DEBUG build 2023-01-18 10:26:15 -08:00
libpq NULL is not an ideal way to spell bool "false". 2023-04-14 13:31:51 -04:00
main Mark options as deprecated in usage output 2023-03-02 14:36:37 +01:00
nodes Revert "Catalog NOT NULL constraints" and fallout 2023-04-12 19:29:21 +02:00
optimizer Revert "Catalog NOT NULL constraints" and fallout 2023-04-12 19:29:21 +02:00
parser Harmonize some more function parameter names. 2023-04-13 10:15:20 -07:00
partitioning Fix incorrect partition pruning logic for boolean partitioned tables 2023-04-14 16:20:27 +12:00
po meson: add install-{quiet, world} targets 2023-03-23 21:20:18 -07:00
port Update copyright for 2023 2023-01-02 15:00:37 -05:00
postmaster Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option 2023-04-07 11:40:31 +12:00
regex Redesign interrupt/cancel API for regex engine. 2023-04-08 22:10:39 +12:00
replication Improve error messages introduced in be87200efd and 0fdab27ad6 2023-04-12 11:00:37 -07:00
rewrite Fix more bugs caused by adding columns to the end of a view. 2023-03-07 18:21:53 -05:00
snowball Update copyright for 2023 2023-01-02 15:00:37 -05:00
statistics Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
storage Support RBM_ZERO_AND_CLEANUP_LOCK in ExtendBufferedRelTo(), add tests 2023-04-14 11:30:33 -07:00
tcop Handle logical slot conflicts on standby 2023-04-08 00:05:44 -07:00
tsearch Update tsearch regex memory management. 2023-04-08 22:09:17 +12:00
utils Adjust Valgrind macro usage to protect chunk headers 2023-04-15 11:59:52 +12:00
.gitignore
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Redesign archive modules 2023-02-17 14:26:42 +09:00
meson.build meson: Prevent installation of test files during main install 2023-03-03 07:45:52 +01:00
nls.mk NLS: Put list of available languages into LINGUAS files 2022-07-13 08:19:17 +02:00