pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@postgresql.org>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Subject: Re: pgsql: Fix failure to check for open() or fsync() failures.
Date: Wed, 26 Dec 2018 21:30:49 -0500
Message-ID: <2389.1545877849@sss.pgh.pa.us> (raw)
In-Reply-To: <20181227021039.GI2106@paquier.xyz>
References: <E1gcGPf-0000Ih-1f@gemulon.postgresql.org>
	<20181226224351.GA2106@paquier.xyz>
	<26009.1545864936@sss.pgh.pa.us>
	<20181227010918.GC2106@paquier.xyz>
	<32282.1545874522@sss.pgh.pa.us>
	<20181227021039.GI2106@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Dec 26, 2018 at 08:35:22PM -0500, Tom Lane wrote:
>> Oh, I see.  Yeah, if we're ignoring errors anyway, the stat calls
>> seem redundant.

> For this one, I think that we could simplify as attached (this causes
> open() to fail additionally because of the sync flags, but that's not
> really worth worrying).  Thoughts?

Actually, now that I think a bit more, this isn't a good idea.  We want
standby_signal_file_found (resp. recovery_signal_file_found) to get set
if the file exists, even if we're unable to fsync it for some reason.
A counterexample to the proposed patch is that a signal file that's
read-only to the server will get ignored, which it should not be.

			regards, tom lane




view thread (7+ messages)

Message-ID: <2389.1545877849@sss.pgh.pa.us>
Permalink:  ../2389.1545877849@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2389.1545877849@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@postgresql.org, peter.eisentraut@2ndquadrant.com
  Subject: Re: pgsql: Fix failure to check for open() or fsync() failures.
  In-Reply-To: <2389.1545877849@sss.pgh.pa.us>
  References: <E1gcGPf-0000Ih-1f@gemulon.postgresql.org> <20181226224351.GA2106@paquier.xyz> <26009.1545864936@sss.pgh.pa.us> <20181227010918.GC2106@paquier.xyz> <32282.1545874522@sss.pgh.pa.us> <20181227021039.GI2106@paquier.xyz> <2389.1545877849@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox