postgresql/src
Michael Paquier cae25d110e Improve stability of recovery test 035_standby_logical_decoding
This commit tweaks a couple of things in 035_standby_logical_decoding to
hopefully stabilize it:
- Autovacuum is now disabled, as it could hold a global xmin with a
transaction.
- Conflicts are generated with command sequences that removed rows (on
catalogs, shared or non-shared, or just plain relations) followed by a
VACUUM.  This was unstable because these did not check that the horizon
moved between the SQL commands and the VACUUM.  The logic is refactored
as follows, to ensure that VACUUM removes dead rows before testing for
slot invalidation on a standby (idea suggested by Andres Freund):
-- Grab the current horizon.
-- Launch SQL commands removing rows.
-- Check that the snapshot horizon has been updated.
-- Launch VACUUM on the relation whose rows have been removed by the
first step.

Note that there are still some issues because of standby snapshot WAL
records generated by the bgwriter, but this makes the test much more
stable.

Per reports from buildfarm members dikkop and skink, with analysis and
tests from Alexander Lakhin.

While on it, fix a couple of incorrect comments.

Author: Bertrand Drouvot
Reviewed-by: Alexander Lakhin, Michael Paquier
Discussion: https://postgr.es/m/OSZPR01MB6310ED3CEDB531BCEDBC6AF2FD479@OSZPR01MB6310.jpnprd01.prod.outlook.com
Discussion: https://postgr.es/m/bf67e076-b163-9ba3-4ade-b9fc51a3a8f6@gmail.com
Backpatch-through: 16
2024-01-23 14:46:05 +09:00
..
backend Re-disallow Memoize for parameterized nested loops with join filters 2024-01-22 22:45:33 +13:00
bin Abort pgbench if script end is reached with an open pipeline 2024-01-22 17:48:30 +01:00
common Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the backend 2023-11-28 08:35:56 +09:00
fe_utils Don't spuriously report FD_SETSIZE exhaustion on Windows. 2023-10-14 15:54:49 -07:00
include Add try_index_open(), conditional variant of index_open() 2024-01-18 15:04:31 +09:00
interfaces Don't test already-referenced pointer for nullness 2024-01-16 12:27:52 +01:00
makefiles Use --strip-unneeded when stripping static libraries with GNU strip. 2023-04-20 18:12:32 -04:00
pl Fix plpgsql to allow new-style SQL CREATE FUNCTION as a SQL command. 2024-01-18 16:10:57 -05:00
port Meson: check for pg_config_paths.h left over from make 2023-08-24 10:33:48 +12:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Improve stability of recovery test 035_standby_logical_decoding 2024-01-23 14:46:05 +09:00
timezone Remove PHOT from our default timezone abbreviations list. 2023-10-28 11:54:51 -04:00
tools Use BIO_{get,set}_app_data instead of BIO_{get,set}_data. 2023-11-28 12:34:03 -05:00
tutorial Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00