]> granicus.if.org Git - postgresql/commit
Fix erroneous error reports in snapbuild.c.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 Feb 2019 06:12:52 +0000 (01:12 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 Feb 2019 06:12:52 +0000 (01:12 -0500)
commita4c6a73aa438d6c44fbe1e5e0c8878051e8c2b54
tree55a986abc05c2661a0bd207caa86aa9f458eb8eb
parent6af8c79868a3d51d9d0ae96c71596bba33780c59
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.
src/backend/replication/logical/snapbuild.c