postgresql/src
Tom Lane b270713fd4 Fix multiple crasher bugs in partitioned-table replication logic.
apply_handle_tuple_routing(), having detected and reported that
the tuple it needed to update didn't exist, tried to update that
tuple anyway, leading to a null-pointer dereference.

logicalrep_partition_open() failed to ensure that the
LogicalRepPartMapEntry it built for a partition was fully
independent of that for the partition root, leading to
trouble if the root entry was later freed or rebuilt.

Meanwhile, on the publisher's side, pgoutput_change() sometimes
attempted to apply execute_attr_map_tuple() to a NULL tuple.

The first of these was reported by Sergey Bernikov in bug #17055;
I found the other two while developing some test cases for this
sadly under-tested code.

Diagnosis and patch for the first issue by Amit Langote; patches
for the others by me; new test cases by me.  Back-patch to v13
where this logic came in.

Discussion: https://postgr.es/m/17055-9ba800ec8522668b@postgresql.org
2021-06-11 16:12:36 -04:00
..
backend Fix multiple crasher bugs in partitioned-table replication logic. 2021-06-11 16:12:36 -04:00
bin Fix inconsistencies in psql --help=commands 2021-06-09 16:25:49 +09:00
common Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
fe_utils Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
include Remove unnecessary declaration in win32_port.h 2021-06-08 13:40:03 +09:00
interfaces Fix incautious handling of possibly-miscoded strings in client code. 2021-06-07 14:15:25 -04:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Force NO SCROLL for plpgsql's implicit cursors. 2021-06-08 18:40:06 -04:00
port Add fallback implementation for setenv() 2021-06-01 09:27:25 +09:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:31 -05:00
test Fix multiple crasher bugs in partitioned-table replication logic. 2021-06-11 16:12:36 -04:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Add fallback implementation for setenv() 2021-06-01 09:27:25 +09:00
tutorial tutorial: land height is "elevation", not "altitude" 2021-03-10 20:25:18 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Update Unicode data to Unicode 13.0.0 and CLDR 37 2020-04-24 09:52:59 +02:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00