pg_dump: address DROP COLUMN FIXME and add regression tests
After reviewing the use of ALTER TABLE DROP COLUMN in the pg_dump code, we feel that the ordering of DDL statements in the dump do not raise any concerns with respect to vanilla table inheritance hierarchies. In the current implementation, we need to cascade the DROP COLUMN to partitions, but we do not want to cascade to "normal" inherited child tables. Because the child tables are not hooked into the inheritance hierarchy until after the DROP COLUMN is performed, it looks like ALTER TABLE and ALTER TABLE ONLY are equivalent for vanilla inheritance. We've added some regression tests that will hopefully catch any changes to the above assumptions. The added sql test file is run from not only pg_regress, but also during the standalone pg_upgrade cluster test. It is intended to contain corner cases specific to pg_upgrade where the state that needs to be tested would otherwise be destroyed during a dump and restore (such as dropped columns). Co-authored-by: NJacob Champion <pchampion@pivotal.io> Co-authored-by: NJim Doty <jdoty@pivotal.io>
Showing
想要评论请 注册 或 登录