postgresql/src
Michael Paquier 1df5875d39 Fix dependency handling of column drop with partitioned tables
When dropping a column on a partitioned table which has one or more
partitioned indexes, the operation was failing as dependencies with
partitioned indexes using the column dropped were not getting removed in
a way consistent with the columns involved across all the relations part
of an inheritance tree.

This commit refactors the code executing column drop so as all the
columns from an inheritance tree to remove are gathered first, and
dropped all at the end.  This way, we let the dependency machinery sort
out by itself the deletion of all the columns with the partitioned
indexes across a partition tree.

This issue has been introduced by 1d92a0c, so backpatch down to
REL_12_STABLE.

Author: Amit Langote, Michael Paquier
Reviewed-by: Álvaro Herrera, Ashutosh Sharma
Discussion: https://postgr.es/m/CA+HiwqE9kuBsZ3b5pob2-cvE8ofzPWs-og+g8bKKGnu6b4-yTQ@mail.gmail.com
Backpatch-through: 12
2019-10-13 17:51:55 +09:00
..
backend Fix dependency handling of column drop with partitioned tables 2019-10-13 17:51:55 +09:00
bin pg_upgrade: Clean up some redundant code 2019-10-10 10:51:11 +02:00
common Fix use of term "verifier" 2019-10-12 21:41:59 +02:00
fe_utils Split out recovery confing-writing code from pg_basebackup 2019-09-25 14:35:24 -03:00
include Fix use of term "verifier" 2019-10-12 21:41:59 +02:00
interfaces Fix use of term "verifier" 2019-10-12 21:41:59 +02:00
makefiles Remove support for non-ELF BSD systems 2019-07-01 23:56:20 +01:00
pl Simplify PGAC_STRUCT_TIMEZONE Autoconf macro 2019-10-07 16:47:23 +02:00
port Remove some code for old unsupported versions of MSVC 2019-10-08 10:50:54 +02:00
template AIX: Stop adding option -qsrcmsg. 2019-10-12 00:21:47 -07:00
test Fix dependency handling of column drop with partitioned tables 2019-10-13 17:51:55 +09:00
timezone Update time zone data files to tzdata release 2019c. 2019-09-20 19:53:33 -04:00
tools Remove some code for old unsupported versions of MSVC 2019-10-08 10:50:54 +02:00
tutorial Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Don't disable ccache when building with coverage support 2019-09-24 10:00:56 +02:00
Makefile.shlib Remove support for non-ELF BSD systems 2019-07-01 23:56:20 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00