pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org, Kunshchikov Vladimir <Vladimir.Kunshchikov@infotecs.ru>
Subject: Re: pg_dump, gzwrite, and errno
Date: Fri, 19 Jun 2020 17:30:47 -0400
Message-ID: <20200619213047.GA7048@alvherre.pgsql> (raw)
In-Reply-To: <1597085.1592515818@sss.pgh.pa.us>

On 2020-Jun-18, Tom Lane wrote:

> Surely it's insufficient as-is, because there is no reason to suppose
> that errno is zero at entry.  You'd need to set errno = 0 first.

Oh, right.

> Also it's fairly customary in our sources to include a comment about
> this machination; so the full ritual is usually more like

Yeah, I had that in my local copy.  Done like that in all the most
obvious places.  But there are more places that are still wrong: I
believe every single place that calls WRITE_ERROR_EXIT is doing the
wrong thing.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (4+ messages)

Message-ID: <20200619213047.GA7048@alvherre.pgsql>
Permalink:  ../20200619213047.GA7048@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200619213047.GA7048@alvherre.pgsql

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, pryzby@telsasoft.com, Vladimir.Kunshchikov@infotecs.ru
  Subject: Re: pg_dump, gzwrite, and errno
  In-Reply-To: <20200619213047.GA7048@alvherre.pgsql>

* 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