Hamid Akhtar <hamid.akhtar@gmail.com> writes:
> To recap, the attached patch moves restoration of comments to the
> RESTORE_PASS_POST_ACL. This ensures that comments are
> restored in a PASS when essentially all required objects are created
> including event triggers and materialized views (and any other db
> objects).
This is surely not a good idea as it stands, because it delays restore
of *all* object comments to the very end. That's not nice for parallel
restores, and it also has large impact on pg_dump's behavior in cases
that have nothing to do with event triggers; which could cause unforeseen
problems.
The right way is to postpone only event trigger comments. I fixed it
that way and pushed it.
regards, tom lane