postgresql/src
Amit Kapila 29b5905470 Fix toast rewrites in logical decoding.
Commit 325f2ec555 introduced pg_class.relwrite to skip operations on
tables created as part of a heap rewrite during DDL. It links such
transient heaps to the original relation OID via this new field in
pg_class but forgot to do anything about toast tables. So, logical
decoding was not able to skip operations on internally created toast
tables. This leads to an error when we tried to decode the WAL for the
next operation for which it appeared that there is a toast data where
actually it didn't have any toast data.

To fix this, we set pg_class.relwrite for internally created toast tables
as well which allowed skipping operations on them during logical decoding.

Author: Bertrand Drouvot
Reviewed-by: David Zhang, Amit Kapila
Backpatch-through: 11, where it was introduced
Discussion: https://postgr.es/m/b5146fb1-ad9e-7d6e-f980-98ed68744a7c@amazon.com
2021-08-25 09:53:07 +05:30
..
backend Fix toast rewrites in logical decoding. 2021-08-25 09:53:07 +05:30
bin Add tab completion for EXPLAIN .. EXECUTE in psql 2021-08-25 12:00:31 +09:00
common Revert refactoring of hex code to src/common/ 2021-08-19 09:20:13 +09:00
fe_utils Skip trailing whitespaces when parsing integer options 2021-07-27 10:39:05 +09:00
include Fix toast rewrites in logical decoding. 2021-08-25 09:53:07 +05:30
interfaces ecpg: Remove trailing period from error message. 2021-08-25 09:57:05 +09:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl Improve error messages about misuse of SELECT INTO. 2021-08-21 10:22:14 -04:00
port Use direct function calls for pg_popcount{32,64} on non-x86 platforms 2021-08-16 11:51:15 -04:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Avoid using ambiguous word "positive" in error message. 2021-08-25 11:46:25 +09:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Revert refactoring of hex code to src/common/ 2021-08-19 09:20:13 +09:00
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Fix prove_installcheck to use correct paths when used with PGXS 2021-07-01 09:02:46 -04:00
Makefile.shlib
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00