postgresql/src
Tom Lane 86874a6dfc 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:06 -04:00
..
backend Avoid trying to write an empty WAL record in log_newpage_range(). 2023-04-17 14:22:06 -04:00
bin Fix pg_dump for hash partitioning on enum columns. 2023-03-17 13:31:40 -04:00
common Fix JSON error reporting for many cases of erroneous string values. 2023-03-13 15:19:00 -04:00
fe_utils Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
include Fix race in parallel hash join batch cleanup, take II. 2023-03-21 14:38:59 +13:00
interfaces Fix inconsistent error handling for GSS encryption in PQconnectPoll() 2023-03-13 16:36:33 +09:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Translation updates 2023-02-06 12:18:46 +01:00
port Re-allow building on Microsoft Visual Studio 2013. 2022-11-10 10:23:49 -05:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:29:08 -04:00
test Fix assignment to array of domain over composite, redux. 2023-04-15 12:01:39 -04:00
timezone Update time zone data files to tzdata release 2022g. 2023-01-31 17:37:22 -05:00
tools Don't force SQL_ASCII/no-locale for installcheck in vcregress.pl 2023-02-26 06:55:42 -05:00
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Prevent port collisions between concurrent TAP tests 2022-11-22 10:52:24 -05:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:28:02 -07:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00