Robert Haas <robertmhaas@gmail.com> writes:
> In v16+, if the grantor is not valid, that's unexpected and something
> has gone wrong, perhaps due to insufficient locking, or maybe due to
> catalog corruption. The warning is a fair response to a
> seemingly-corrupted catalog state. But in v15-, this is just business
> as usual; there's no particular expectation that the grantor must be a
> valid role OID, and IMHO the best thing to do is give the same result
> that a pre-v16 pg_dumpall would have produced.
I don't entirely agree that it's "business as usual": somebody screwed
up to get the database into that state. I'm not here to apportion
blame for that between the user and the database, but I do think it's
appropriate for pg_dumpall to complain that it's facing invalid data.
If you're good with pg_dumpall producing a warning and then emitting
the GRANT with no grantor clause, I will go make that happen.
regards, tom lane