Fix pg_dump/pg_restore to restore event trigger comments later.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Apr 2020 15:23:39 +0000 (11:23 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 8 Apr 2020 15:23:39 +0000 (11:23 -0400)
commit830471e0dcf67b12f229bfa9489643eb108f580f
tree476197c32c9aa3937b74dc563104213e7239ac42
parent4c7a311a2df9b3b91285def8de2e1308f90e9e21
Fix pg_dump/pg_restore to restore event trigger comments later.

Repair an oversight in commit 8728b2c70: if we're postponing restore
of event triggers to the end, we must also postpone restoring any
comments on them, since of course we cannot create the comments first.
(This opens yet another opportunity for an event trigger to bollix
the restore, but there's no help for that.)

Per bug #16346 from Alexander Lakhin.

Like the previous commit, back-patch to all supported branches.

Hamid Akhtar and Tom Lane

Discussion: https://postgr.es/m/16346-6210ad7a0ea81be1@postgresql.org
src/bin/pg_dump/pg_backup_archiver.c