Re: backup tools ought to ensure created backups are durable

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: backup tools ought to ensure created backups are durable
Date: 2016-03-29 08:22:34
Message-ID: CABUevEznZAo+aCf6+w2tAnOe=kynQjMXF3MrZb9SLeFAWHQQNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 29, 2016 at 10:12 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:

> On 2016-03-29 10:06:20 +0200, Magnus Hagander wrote:
> > On Tue, Mar 29, 2016 at 8:46 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
> wrote:
> >
> > > On 3/28/16 11:03 AM, Magnus Hagander wrote:
> > >
> > >>
> > >> That should work yeah. And given that we already use that check in
> other
> > >> places, it seems it should be perfectly safe. And as long as we only
> do
> > >> a WARNING and not abort if the fsync fails, we should be OK if people
> > >> intentionally store their backups on an fs that doesn't speak fsync
> (if
> > >> that exists), in which case I don't really think we even need a switch
> > >> to turn it off.
> > >>
> > >
> > > I'd even go so far as spitting out a warning any time we can't fsync
> > > (maybe that's what you're suggesting?)
> >
> >
> > That is pretty much what I was suggesting, yes.
> >
> > Though we might want to consolidate them in for example pg_basebackup -Fp
> > and pg_dump -Fd into something like "failed to fsync <n> files".
>
> I'd just not output anything if ENOTSUPP or similar is returned, and not
> bother with something as complex as collecting errors.
>

That'll work too, I guess. Won't necessarily make people aware of the
problem, but in the unlikely event they use a fs like that they should be
aware of it already.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2016-03-29 08:36:44 Re: Support for N synchronous standby servers - take 2
Previous Message Andres Freund 2016-03-29 08:12:29 Re: backup tools ought to ensure created backups are durable