postgresql/src/bin
Tom Lane 0ed707e9b7 In pg_dump, ensure that view triggers are processed after view rules.
If a view is split into CREATE TABLE + CREATE RULE to break a circular
dependency, then any triggers on the view must be dumped/reloaded after
the CREATE RULE; else the backend may reject the CREATE TRIGGER because
it's the wrong type of trigger for a plain table.  This works all right
in plain dump/restore because of pg_dump's sorting heuristic that places
triggers after rules.  However, when using parallel restore, the ordering
must be enforced by a dependency --- and we didn't have one.

Fixing this is a mere matter of adding an addObjectDependency() call,
except that we need to be able to find all the triggers belonging to the
view relation, and there was no easy way to do that.  Add fields to
pg_dump's TableInfo struct to remember where the associated TriggerInfo
struct(s) are.

Per bug report from Dennis Kögel.  The failure can be exhibited at least
as far back as 9.1, so back-patch to all supported branches.
2016-02-04 00:26:10 -05:00
..
initdb Fix unobvious interaction between -X switch and subdirectory creation. 2016-01-07 18:20:57 -05:00
pg_archivecleanup Make WAL-related utilities handle .partial WAL files properly. 2015-07-03 11:53:58 +09:00
pg_basebackup Fix typo in comment 2016-02-02 13:49:02 +01:00
pg_config Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_controldata PostgresNode: Add names to nodes 2016-01-20 14:13:11 -03:00
pg_ctl PostgresNode: Add names to nodes 2016-01-20 14:13:11 -03:00
pg_dump In pg_dump, ensure that view triggers are processed after view rules. 2016-02-04 00:26:10 -05:00
pg_resetxlog Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_rewind PostgresNode: Add names to nodes 2016-01-20 14:13:11 -03:00
pg_test_fsync Move pg_test_fsync from contrib/ to src/bin/ 2015-04-19 22:20:49 -04:00
pg_test_timing Move pg_test_timing from contrib/ to src/bin/ 2015-04-20 21:30:12 -04:00
pg_upgrade Fix spelling mistakes. 2016-01-14 23:16:40 -05:00
pg_xlogdump Refactor headers to split out standby defs 2016-01-20 18:51:34 -08:00
pgbench pgbench: allow per-script statistics 2016-02-01 15:55:33 +01:00
pgevent Update copyright for 2016 2016-01-02 13:33:40 -05:00
psql Remove printQueryOpt.quote field. 2016-02-02 15:26:30 -05:00
scripts PostgresNode: Add names to nodes 2016-01-20 14:13:11 -03:00
Makefile Update copyright for 2016 2016-01-02 13:33:40 -05:00