pgsql: Fix erroneous error reports in snapbuild.c.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix erroneous error reports in snapbuild.c.
Date: 2019-02-12 06:13:17
Message-ID: E1gtRJl-0002zM-N9@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix erroneous error reports in snapbuild.c.

It's pretty unhelpful to report the wrong file name in a complaint
about syscall failure, but SnapBuildSerialize managed to do that twice
in a span of 50 lines. Also fix half a dozen missing or poorly-chosen
errcode assignments; that's mostly cosmetic, but still wrong.

Noted while studying recent failures on buildfarm member nightjar.
I'm not sure whether those reports are actually giving the wrong
filename, because there are two places here with identically
spelled error messages. The other one is specifically coded not
to report ENOENT, but if it's this one, how could we be getting
ENOENT from open() with O_CREAT? Need to sit back and await results.

However, these ereports are clearly broken from birth, so back-patch.

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/442d44fb480d1298a3ed47f869ad2c7fbfca53a7

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-02-12 15:26:06 pgsql: Use Getopt::Long for catalog scripts
Previous Message Michael Paquier 2019-02-12 04:11:42 pgsql: Fix description of WAL record XLOG_PARAMETER_CHANGE