postgresql/src
Amit Kapila feb4e218e5 Fix uninitialized access to InitialRunningXacts during decoding after ERROR.
The transactions and subtransactions array that was allocated under
snapshot builder memory context and recorded during decoding was not
cleared in case of errors. This can result in an assertion failure if we
attempt to retry logical decoding within the same session. To address this
issue, we register a callback function under the snapshot builder memory
context to clear the recorded transactions and subtransactions array along
with the context.

This problem doesn't exist in PG16 and HEAD as instead of using
InitialRunningXacts, we added the list of transaction IDs and
sub-transaction IDs, that have modified catalogs and are running during
snapshot serialization, to the serialized snapshot (see commit 7f13ac8123).

Author: Hou Zhijie
Reviewed-by: Amit Kapila
Backpatch-through: 11
Discussion: http://postgr.es/m/18055-ab3beed9f4b7b7d6@postgresql.org
2023-09-12 09:36:56 +05:30
..
backend Fix uninitialized access to InitialRunningXacts during decoding after ERROR. 2023-09-12 09:36:56 +05:30
bin pg_basebackup: Generate valid temporary slot names under PQbackendPID() 2023-09-07 14:12:36 +09:00
common Inhibit mingw CRT's auto-globbing of command line arguments 2022-04-25 15:51:27 -04:00
fe_utils Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
include Avoid unnecessary plancache revalidation of utility statements. 2023-08-24 12:02:40 -04:00
interfaces Stamp 11.21. 2023-08-07 16:15:30 -04:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
pl Avoid unnecessary plancache revalidation of utility statements. 2023-08-24 12:02:40 -04:00
port Stamp 11.21. 2023-08-07 16:15:30 -04:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:29:17 -04:00
test Remove test from commit fa2e874946. 2023-08-10 10:27:24 -07:00
timezone Update time zone data files to tzdata release 2023c. 2023-04-18 14:46:39 -04:00
tools Cache by-reference missing values in a long lived context 2023-08-23 17:22:16 -04: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 Fix prove_installcheck when used with PGXS 2023-05-05 07:12:26 +02:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00