postgresql/src/backend
Peter Eisentraut ab28feae2b Handle heap rewrites better in logical replication
A FOR ALL TABLES publication naturally considers all base tables to be a
candidate for replication.  This includes transient heaps that are
created during a table rewrite during DDL.  This causes failures on the
subscriber side because it will not have a table like pg_temp_16386 to
receive data (and if it did, it would be the wrong table).

The prevent this problem, we filter out any tables that match this
naming pattern and match an actual table from FOR ALL TABLES
publications.  This is only a heuristic, meaning that user tables that
match that naming could accidentally be omitted.  A more robust solution
might require an explicit marking of such tables in pg_class somehow.

Reported-by: yxq <yxq@o2.pl>
Bug: #14785
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com>
2017-09-26 10:13:43 -04:00
..
access Remove lsn from HashScanPosData. 2017-09-26 09:16:45 -04:00
bootstrap Sync process names between ps and pg_stat_activity 2017-09-20 08:59:03 -04:00
catalog Fix bogus size calculation in strlist_to_textarray(). 2017-09-23 15:01:59 -04:00
commands ... and the very same bug in publicationListToArray(). 2017-09-23 15:16:48 -04:00
executor Make construct_[md_]array return a valid empty array for zero-size input. 2017-09-25 11:55:24 -04:00
foreign
lib Fix uninitialized variable in dshash.c. 2017-09-18 17:43:37 -07:00
libpq Refactor new file permission handling 2017-09-23 10:16:18 -04:00
main Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
nodes Add inline murmurhash32(uint32) function. 2017-09-22 13:38:42 -07:00
optimizer Quieten warnings about unused variables 2017-09-21 08:41:14 -04:00
parser After a MINVALUE/MAXVALUE bound, allow only more of the same. 2017-09-15 21:15:55 -04:00
po Translation updates 2017-08-07 13:55:34 -04:00
port Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
postmaster Improve memory management in autovacuum.c. 2017-09-23 13:28:16 -04:00
regex Mop-up for commit 85feb77aa0. 2017-09-22 11:35:12 -04:00
replication Handle heap rewrites better in logical replication 2017-09-26 10:13:43 -04:00
rewrite Message style fixes 2017-09-11 11:21:27 -04:00
snowball
statistics Remove obsolete comments about functional dependencies 2017-07-26 11:40:39 -04:00
storage Avoid SIGBUS on Linux when a DSM memory request overruns tmpfs. 2017-09-25 16:09:19 -04:00
tcop Rearm statement_timeout after each executed query. 2017-09-18 19:36:44 -07:00
tsearch Mop-up for commit 85feb77aa0. 2017-09-22 11:35:12 -04:00
utils Make construct_[md_]array return a valid empty array for zero-size input. 2017-09-25 11:55:24 -04:00
.gitignore
common.mk
Makefile Inject $(ICU_LIBS) regardless of platform. 2017-08-20 21:22:18 -07:00
nls.mk