Re: No error checking when reading from file using zstd in pg_dump

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Evgeniy Gorbanev <gorbanyoves(at)basealt(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: No error checking when reading from file using zstd in pg_dump
Date: 2025-06-16 20:49:54
Message-ID: 1A6AF154-BFDE-4FFC-8153-B859DF9E509F@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 16 Jun 2025, at 21:45, Tomas Vondra <tomas(at)vondra(dot)me> wrote:

> Regarding the Z_NULL, I believe it has always been ignored like this, at
> least since 9.1. The code simply returns what gzgets() returns, and then
> compares that to NULL, etc. Is there there's a better way to deal with
> Z_NULL? I suppose we could explicitly check/translate Z_NULL to NULL,
> although Z_NULL is simply defined as 0. I don't recall if NULL has some
> additional magic.

Right, to be clear, I don't think there is a bug here (or the risk one going
forward). It's just my own preference of not mixing API concepts

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-06-16 21:09:27 Re: pg_dump --with-* options
Previous Message Tom Lane 2025-06-16 20:49:00 Re: No error checking when reading from file using zstd in pg_dump