pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Raphael Hertzog <hertzog@debian.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there
Date: Tue, 7 Nov 2017 07:32:11 -0800
Message-ID: <20171107153211.d6io4ozig57eka6r@alap3.anarazel.de> (raw)
In-Reply-To: <20171107152321.c3732btntvkwhnjr@home.ouaza.com>
References: <20171107135454.lbelbbvfgadljmuj@home.ouaza.com>
	<20171107141338.getbacqd2vich7yi@alvherre.pgsql>
	<20171107141827.GW4628@tamriel.snowman.net>
	<20171107144727.m6w4psl5kwm2p7jl@home.ouaza.com>
	<20171107144858.GX4628@tamriel.snowman.net>
	<11052.1510066721@sss.pgh.pa.us>
	<20171107150002.GY4628@tamriel.snowman.net>
	<11397.1510067215@sss.pgh.pa.us>
	<20171107152321.c3732btntvkwhnjr@home.ouaza.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2017-11-07 16:23:21 +0100, Raphael Hertzog wrote:
> On Tue, 07 Nov 2017, Tom Lane wrote:
> > Yeah, it does sound more like a filesystem bug than anything else.
> > (I completely reject the notion that it's an application error to
> > fsync a directory when you haven't modified it.)
> >
> > In view of the fact that we just wrapped 10.1, it'd be 3 months before
> > any change from our side would reach the wild.  I think a key question
> > here is whether the Kali developers are likely to fix it from their side
> > in less time than that.
>
> Fix what?
>
> Following your logic, if anything needs to be fixed, it's the Linux kernel
> that has to be fixed, and in particular its overlayfs filesystem.

Right. The kernel knows the file/directory ain't dirty. We don't.


> The time
> to get a fix there is also relatively long. If they work on a fix quickly,
> it might get merged for Linux 3.15 which we will not have in Kali before
> 2-3 months too.

So the same timeframe as a new PG release?


> For now, I have added an ugly work-around that creates a file in the
> pg_commit_ts directory (and immediately drops it) just before starting
> PostgreSQL:
> http://git.kali.org/gitweb/?p=packages/kali-defaults.git;a=commitdiff;h=f4287fd774f8d0686ba919f57355...

Hm. The comment:
+    # Ensure the directory is copied over in the tmpfs
suggests that the overlay isn't persistent? If that's indeed the case,
you could just disable fsyncs alltogether.

Greetings,

Andres Freund


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (21+ messages)  latest in thread

Message-ID: <20171107153211.d6io4ozig57eka6r@alap3.anarazel.de>
Permalink:  ../20171107153211.d6io4ozig57eka6r@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20171107153211.d6io4ozig57eka6r@alap3.anarazel.de

 · 

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-bugs@postgresql.org
  Cc: andres@anarazel.de, hertzog@debian.org, tgl@sss.pgh.pa.us, sfrost@snowman.net, alvherre@alvh.no-ip.org
  Subject: Re: Fails to work on live images due to fsync() on pg_commit_ts before doing any write there
  In-Reply-To: <20171107153211.d6io4ozig57eka6r@alap3.anarazel.de>
  References: <20171107135454.lbelbbvfgadljmuj@home.ouaza.com> <20171107141338.getbacqd2vich7yi@alvherre.pgsql> <20171107141827.GW4628@tamriel.snowman.net> <20171107144727.m6w4psl5kwm2p7jl@home.ouaza.com> <20171107144858.GX4628@tamriel.snowman.net> <11052.1510066721@sss.pgh.pa.us> <20171107150002.GY4628@tamriel.snowman.net> <11397.1510067215@sss.pgh.pa.us> <20171107152321.c3732btntvkwhnjr@home.ouaza.com> <20171107153211.d6io4ozig57eka6r@alap3.anarazel.de>

* 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