pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Subject: Re: gzgetc() is hazardous to your health
Date: Sun, 19 Oct 2025 12:57:16 -0400
Message-ID: <2264270.1760893036@sss.pgh.pa.us> (raw)
In-Reply-To: <2122679.1760846783@sss.pgh.pa.us>
References: <2122679.1760846783@sss.pgh.pa.us>

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





view thread (2+ messages)

Message-ID: <2264270.1760893036@sss.pgh.pa.us>
Permalink:  ../2264270.1760893036@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2264270.1760893036@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: gzgetc() is hazardous to your health
  In-Reply-To: <2264270.1760893036@sss.pgh.pa.us>
  References: <2122679.1760846783@sss.pgh.pa.us> <2264270.1760893036@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox