postgresql/src
Jeff Davis ed57cac84d pg_walinspect: fix case where flush LSN is in the middle of a record.
Instability in the test for pg_walinspect revealed that
pg_get_wal_records_info_till_end_of_wal(x) would try to decode all the
records with a start LSN earlier than the flush LSN, even though that
might include a partial record at the end of the range. In that case,
read_local_xlog_page_no_wait() would return NULL when it tried to read
past the flush LSN, which would be interpreted as an error by the
caller. That caused a test failure only on a BF animal that had been
restarted recently, but could be expected to happen in the wild quite
easily depending on the alignment of various parameters.

Fix by using private data in read_local_xlog_page_no_wait() to signal
end-of-wal to the caller, so that it can be properly distinguished
from a real error.

Discussion: https://postgr.es/m/Ymd/e5eeZMNAkrXo%40paquier.xyz
Discussion: https://postgr.es/m/111657.1650910309@sss.pgh.pa.us

Authors: Thomas Munro, Bharath Rupireddy.
2022-04-30 09:05:32 -07:00
..
backend pg_walinspect: fix case where flush LSN is in the middle of a record. 2022-04-30 09:05:32 -07:00
bin Remove some recently-added pg_dump test cases. 2022-04-22 16:19:39 -04:00
common Inhibit mingw CRT's auto-globbing of command line arguments 2022-04-25 15:47:55 -04:00
fe_utils Allow db.schema.table patterns, but complain about random garbage. 2022-04-20 11:37:29 -04:00
include pg_walinspect: fix case where flush LSN is in the middle of a record. 2022-04-30 09:05:32 -07:00
interfaces Fix missed cases in libpq's error handling. 2022-04-21 17:12:49 -04:00
makefiles Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
pl Tighten enforcement of variable CONSTANT markings in plpgsql. 2022-04-30 11:54:28 -04:00
port Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
template Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
test Tighten enforcement of variable CONSTANT markings in plpgsql. 2022-04-30 11:54:28 -04:00
timezone Update copyright for 2022 2022-01-07 19:04:57 -05:00
tools Build libpq test programs under MSVC 2022-04-16 09:36:08 -04:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Update Unicode data to CLDR 41 2022-04-06 08:17:33 +02:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Improve frontend error logging style. 2022-04-08 14:55:14 -04:00