pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Tolerate ENOSYS failure from sync_file_range().
Date: Sun, 24 Feb 2019 10:14:35 +0000
Message-ID: <E1gxqnr-000156-0g@gemulon.postgresql.org> (raw)

Tolerate ENOSYS failure from sync_file_range().

One unintended consequence of commit 9ccdd7f6 was that Windows WSL
users started getting a panic whenever we tried to initiate data
flushing with sync_file_range(), because WSL does not implement that
system call.  Previously, they got a stream of periodic warnings,
which was also undesirable but at least ignorable.

Prevent the panic by handling ENOSYS specially and skipping the panic
promotion with data_sync_elevel().  Also suppress future attempts
after the first such failure so that the pre-existing problem of
noisy warnings is improved.

Back-patch to 9.6 (older branches were not affected in this way by
9ccdd7f6).

Author: Thomas Munro and James Sewell
Tested-by: James Sewell
Reported-by: Bruce Klein
Discussion: https://postgr.es/m/CA+mCpegfOUph2U4ZADtQT16dfbkjjYNJL1bSTWErsazaFjQW9A@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/64b8c51bccad13462a8876f269c746e24e9068fd

Modified Files
--------------
src/backend/storage/file/fd.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)



view thread (4+ messages)

Message-ID: <E1gxqnr-000156-0g@gemulon.postgresql.org>
Permalink:  ../E1gxqnr-000156-0g@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1gxqnr-000156-0g@gemulon.postgresql.org

 · 

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: tmunro@postgresql.org
  Subject: Re: pgsql: Tolerate ENOSYS failure from sync_file_range().
  In-Reply-To: <E1gxqnr-000156-0g@gemulon.postgresql.org>
  References: <E1gxqnr-000156-0g@gemulon.postgresql.org>

* 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