Re: Simplifies checks (src/bin/pg_dump/pg_backup_archiver.c)

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Simplifies checks (src/bin/pg_dump/pg_backup_archiver.c)
Date: 2026-03-09 13:25:18
Message-ID: 00DD62ED-F445-4344-989D-BE8C26C05E94@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 9 Mar 2026, at 14:07, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:

> Coverity has some alerts about the function *RestoreArchive*,
> arguing that there are null variable dereferences.

Coverity is very good at generating false positives.

> I haven't done in-depth research to determine if this is correct or not.
> However, the code can be simplified to a single check that would silence notifications and protect against this issue.

You probably should do that research. What if te is actually null and with
your patch the code accepts it rather than crashes. Does that affect the
integrity of the dump? Will it crash soon after? Is te allowed to be null?

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alena Rybakina 2026-03-09 13:25:37 Re: Vacuum statistics
Previous Message Ranier Vilela 2026-03-09 13:16:20 Avoid multiple calls to memcpy (src/backend/access/index/genam.c)