Re: pg_dump, gzwrite, and errno
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers@postgresql.org, Kunshchikov Vladimir <Vladimir.Kunshchikov@infotecs.ru>
Date: 2020-06-19T21:30:47Z
Lists: pgsql-hackers
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
Commits
-
Ensure write failure reports no-disk-space
- e74559c97630 13.0 landed
- ae3259c55067 14.0 landed
- 83762d0a928d 9.6.19 landed
- 5b52008a6441 12.4 landed
- 411febd53e99 10.14 landed
- 2e155d90d1b8 11.9 landed
- bbbce94dc262 9.5.23 landed
-
Fix build on zlib-less environments
- 9a3b5d3ad0f1 10.0 cited
-
Fix pg_dump's errno checking for zlib I/O
- 4d57e8381677 10.0 cited