Re: File system snapshots for multiple file systems

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, tomas(at)tuxteam(dot)de, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: File system snapshots for multiple file systems
Date: 2008-04-08 19:39:13
Message-ID: 20080408213913.6562d6cc@mha-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> > "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> >> Whether it's a good idea or not is a bit debatable though. I'm
> >> concerned about the WAL partition filling up (--> PANIC),
> >> especially if you forget to pg_stop_backup after getting your
> >> backup.
>
> > We check if pg_start_backup in effect when we an ENOSPC error on
> > the WAL partition and if so turn it off, clean old WAL segments,
> > and march on.
>
> > The major concern being that someone might have a bad backup.
> > pg_stop_backup() could scream but they might not notice. Not sure
> > how much more we could do about that.
>
> Not putting in the foot-gun in the first place is what we could do
> about it.

AFAIK, this is a foot-gun that other databases provide, simply because
it's *very* useful when used right. But if you leave a hanging backup
process, it *will* fill your disk and eventually shut down the
database. Making sure that does not happen is a function of the backup
software and of the monitoring software.

One way I think at least MSSQL deals with it is by issuing both the
start and end backup pieces (actually they run as a single command, but
internally it's split I'm sure) over the same connection, and if that
connection goes away, it'll automatically consider the backup aborted.
I would assume the others do something similar in the caes of a crash,
but if the backup process just hangs, it will fill up the disk (I've
had this happen back when backups were actually made to tape, and the
tape ran out, for example)

//Magnus

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2008-04-08 19:58:19 Re: [PATCHES] libpq type system 0.9a
Previous Message Heikki Linnakangas 2008-04-08 19:39:11 Re: File system snapshots for multiple file systems