From: Stephen Frost <sfrost@snowman.net>
To: Paul Förster <paul.foerster@gmail.com>
Cc: Wolff, Ken L <ken.l.wolff@lmco.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Netapp SnapCenter
Date: Mon, 22 Jun 2020 13:00:55 -0400
Message-ID: <20200622170054.GH3125@tamriel.snowman.net> (raw)
In-Reply-To: <ADAD1551-4505-4290-A253-27F037D727F7@gmail.com>
References: <9530455b85e640deb1dbe74d6a5a2a74@lmco.com>
<ADAD1551-4505-4290-A253-27F037D727F7@gmail.com>
Greetings,
* Paul Förster (paul.foerster@gmail.com) wrote:
> > On 22. Jun, 2020, at 17:46, Wolff, Ken L <ken.l.wolff@lmco.com> wrote:
> > So apologies if this is a stupid question but there's obviously been a lot of discussion on this issue. Was a consensus ever reached on the following?
> >
> > If a Postgres database (both data and WAL) is located on one NetApp volume, meaning a snapshot should capture everything at exactly the same time with the required atomicity, do we still need to put the database into backup mode beforehand (and take it out afterwards)? If we don't put Postgres into backup mode first, will we still be able to use the WALs to roll transactions forward or would we be limited to only the point-in-time at which that snapshot was taken?
>
> you're absolutely fine with that as long as PGDATA and the pg_wal directory are located on the same volume. But you can't perform a PITR.
... and all tablespaces are also on that volume. Basically, anything
that PG might ever write to needs to all be included in that atomic
write.
> If you don't do pg_start_backup() then you won't be able to perform a PITR but if that's an "I-will-*DEFINITELY*-never-need-a-PITR" situation, then that's ok. Otherwise, from what I learned, you do a pg_start_backup(), then do the volume snapshot, and finally the pg_stop_backup() saving the output of the latter for PITR purposes.
Note that the output from pg_stop_backup() is absolutely essential for
the backup itself, not just if you want to do PITR.
As for doing PITR with such a snapshot, it's not something I'd recommend
as a general PITR-supporting backup strategy as it ends up being
complicated and very much has a risk associated with it that you'll end
up with a corrupted database if you don't manage it properly (and PG is
pretty limited in its ability to help you with this process..).
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
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-general@postgresql.org
Cc: sfrost@snowman.net, paul.foerster@gmail.com, ken.l.wolff@lmco.com, magnus@hagander.net
Subject: Re: Netapp SnapCenter
In-Reply-To: <20200622170054.GH3125@tamriel.snowman.net>
References: <9530455b85e640deb1dbe74d6a5a2a74@lmco.com> <ADAD1551-4505-4290-A253-27F037D727F7@gmail.com> <20200622170054.GH3125@tamriel.snowman.net>
* 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