Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jnPoa-0005j0-GG for pgsql-general@arkaria.postgresql.org; Mon, 22 Jun 2020 17:01:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jnPoY-0004sh-O4 for pgsql-general@arkaria.postgresql.org; Mon, 22 Jun 2020 17:00:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jnPoY-0004sa-Fx for pgsql-general@lists.postgresql.org; Mon, 22 Jun 2020 17:00:58 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jnPoW-0001GJ-46 for pgsql-general@postgresql.org; Mon, 22 Jun 2020 17:00:57 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 17D4B5F79F; Mon, 22 Jun 2020 13:00:55 -0400 (EDT) Date: Mon, 22 Jun 2020 13:00:55 -0400 From: Stephen Frost To: Paul =?iso-8859-1?Q?F=F6rster?= Cc: "Wolff, Ken L" , Magnus Hagander , pgsql-general Subject: Re: Netapp SnapCenter Message-ID: <20200622170054.GH3125@tamriel.snowman.net> References: <9530455b85e640deb1dbe74d6a5a2a74@lmco.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NqSa+Xr3J/G6Hhls" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --NqSa+Xr3J/G6Hhls Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Paul F=F6rster (paul.foerster@gmail.com) wrote: > > On 22. Jun, 2020, at 17:46, Wolff, Ken L 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 follo= wing? > >=20 > > If a Postgres database (both data and WAL) is located on one NetApp vol= ume, meaning a snapshot should capture everything at exactly the same time = with the required atomicity, do we still need to put the database into back= up 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 trans= actions forward or would we be limited to only the point-in-time at which t= hat snapshot was taken? >=20 > you're absolutely fine with that as long as PGDATA and the pg_wal directo= ry are located on the same volume. But you can't perform a PITR. =2E.. 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 PIT= R 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 --NqSa+Xr3J/G6Hhls Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJe8OPGAAoJEO1sijiDR2RVhPkP/i+494IW3GphGtDWRdQoouX2 xkvTdCT4NTZY//pNSwd6PD9v+w6qOgzBhVW1+eH3HtySV6BE4P1Y30d5ijytHlQI qzQAOLRFHOr8ZzE7eRZXeIEj+gloBah2g9APZ/3bQzdhJHjTPt6jtfQfHJYxkItQ KkkP+01JP1LAQ1k4devzbqH0PL494vDNQJXo4JfAU/I2j6CIChk7TGRzXHz0/lKN e8cmEDlNdep6hVJ2rVZ1wOUCZZwROaeqjP42z0czft+5Q0p/kVK46bFbn/Do0YqY rQADZe90fUV2h6lkvxTm+fTNEA+DRAazs0BwbDTxcYfq77/rwnwwj1XXeqwMV6wi WlzHbGgBKvnzDX5X7Cvh4b8ZvzScnffFcFIFFWRTmD92846RBw7AU9RHp/y6Cbc/ WOm72+HStAoWsXlstBHbW7mHbaIE6MzXgdYCKnempXldineP0tKrtUUtG6aHkxzK UtqecZHT3y2FYZOM7DBdjgrTx+uwD236KUbZf3H1nswtbUf/uKIxcLLPnEgA16Z0 GJfH1tn+LDIY/D9TudGAgmFhFa1quStt/rO366kCgaCAPOP40udx/3afxodliJzq 8KEYj6NcYGVneIksfyleq4uxyh+cvftOxMkdZ3JgDdUrdncMINgMq0CsPnsViCMl FsLLjaWtAZKGXA0IfsvP =ZlqE -----END PGP SIGNATURE----- --NqSa+Xr3J/G6Hhls--