Re: Should program exit, When close() failed for O_RDONLY mode

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: "Lin, Cuiping" <lincuiping(at)cn(dot)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should program exit, When close() failed for O_RDONLY mode
Date: 2020-05-04 00:20:07
Message-ID: 20200504002007.GD471944@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 03, 2020 at 10:18:27AM -0700, Noah Misch wrote:
> I would not say that. If close() does fail, something is badly wrong in the
> program or the system running it. Though I opt not to check the return value,
> if one does check it, exiting is a suitable response.

FWIW, it seems to me that we have an argument for copy_fetch.c that it
can be an advantage to know if something wrong is going on
beforehand: let's remember that after running pg_rewind, the target
will be started to replay up to its consistent point.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-05-04 04:09:56 Re: WAL usage calculation patch
Previous Message Andres Freund 2020-05-03 21:20:12 Re: [REPORT] Static analys warnings