Re: gzgetc() is hazardous to your health
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2025-10-19T16:57:16Z
Lists: pgsql-hackers
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
Commits
-
Don't rely on zlib's gzgetc() macro.
- c865f5b9f090 16.11 landed
- aa1fcd087e5f 18.1 landed
- 8b9924bce729 15.15 landed
- 40dc710a61aa 14.20 landed
- 33276cd0272e 13.23 landed
- 2efca163399b 17.7 landed
- 277dec651472 19 (unreleased) landed