I wrote:
> What I think we ought to do about this is get rid of our one usage
> of gzgetc(), replacing it with a one-byte gzread() operation.
> That's not lovely from a speed perspective, but I don't think that
> reading a pg_dump TOC file is really speed-critical.
In the light of morning I had a better, or at least easier, idea:
just #undef gzgetc and fall back on the underlying function.
That's at least a little faster than gzread(), too.
regards, tom lane