Re: Incorrect errno used with %m for backend code
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>, Postgres hackers <pgsql-hackers@postgresql.org>
Date: 2018-06-22T19:14:06Z
Lists: pgsql-hackers
Hi, On 2018-06-22 11:15:53 -0400, Alvaro Herrera wrote: > I don't understand the logic in RestoreSlotFromDisk that fsync the file > prior to reading it. What are we protecting against? we could previously have crashed before fsyncing. But we can only rely on slot contents being durable if we fsync them. Therefore we fsync before reading, after a crash. > Anyway, while I think it would be nice to have CloseTransientFile > restore the original errno if there was one and close goes well, it > probably unduly complicates its API contract. Yea, agreed. Greetings, Andres Freund
Commits
-
Address set of issues with errno handling
- f53ed82b7fee 9.3.24 landed
- 79b5b101f992 9.4.19 landed
- 910e2aca129c 9.5.14 landed
- 7fdf56b0a796 9.6.10 landed
- 6eec6724ff45 10.5 landed
- 6cb3372411fd 11.0 landed