postgresql/src
Alvaro Herrera 3b23552ad8 Make pg_dump emit ATTACH PARTITION instead of PARTITION OF
Using PARTITION OF can result in column ordering being changed from the
database being dumped, if the partition uses a column layout different
from the parent's.  It's not pg_dump's job to editorialize on table
definitions, so this is not acceptable; back-patch all the way back to
pg10, where partitioned tables where introduced.

This change also ensures that partitions end up in the correct
tablespace, if different from the parent's; this is an oversight in
ca4103025d (in pg12 only).  Partitioned indexes (in pg11) don't have
this problem, because they're already created as independent indexes and
attached to their parents afterwards.

This change also has the advantage that the partition is restorable from
the dump (as a standalone table) even if its parent table isn't
restored.

Author: David Rowley
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/CAKJS1f_1c260nOt_vBJ067AZ3JXptXVRohDVMLEBmudX1YEx-A@mail.gmail.com
Discussion: https://postgr.es/m/20190423185007.GA27954@alvherre.pgsql
2019-04-24 15:30:37 -04:00
..
backend Fix some minor postmaster-state-machine issues. 2019-04-24 14:15:44 -04:00
bin Make pg_dump emit ATTACH PARTITION instead of PARTITION OF 2019-04-24 15:30:37 -04:00
common Add support for partial TOAST decompression 2019-04-02 12:35:32 -04:00
fe_utils Ensure consistent name matching behavior in processSQLNamePattern(). 2019-04-05 12:59:57 -04:00
include Allow pg_class xid & multixid horizons to not be set. 2019-04-23 21:42:12 -07:00
interfaces GSSAPI: Improve documentation and tests 2019-04-19 21:22:22 -04:00
makefiles Define WIN32_STACK_RLIMIT throughout win32 and cygwin builds. 2019-04-09 08:25:39 -07:00
pl Fix problems with auto-held portals. 2019-04-19 11:20:37 -04:00
port Assert that pgwin32_signal_initialize() has been called early enough. 2019-04-03 17:11:16 -07:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Repair assorted issues in locale data extraction. 2019-04-23 18:51:30 -04:00
timezone More unconstify use 2019-02-13 11:50:16 +01:00
tools Consistently test for in-use shared memory. 2019-04-12 22:36:38 -07:00
tutorial SQL comment: remove extra word in heading comment 2019-01-25 18:57:21 -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 Consistently test for in-use shared memory. 2019-04-12 22:36:38 -07: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 Unified logging system for command-line programs 2019-04-01 20:01:35 +02:00