From: Mladen Gogala <gogala.mladen@gmail.com>
To: Stephen Frost <sfrost@snowman.net>
Cc: Lucas <root@sud0.nz>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: ZFS filesystem - supported ?
Date: Mon, 25 Oct 2021 14:09:13 -0400
Message-ID: <5608bbca-2bc6-57f1-8bcc-4b5f63eff2f6@gmail.com> (raw)
In-Reply-To: <20211025171342.GH20998@tamriel.snowman.net>
References: <49ijds_99IK_4iDOHuZH8CJsKGZw7DEVtJPf0s_oPEvUKwFewHcDQFCUnutcA9GYIkOrRfFAKRsyj0ZFN9ECAbLm-NYPR8jMxTl-RU-U3hA=@protonmail.ch>
<1e0db1d2-6a9e-f5f7-44af-e7a1997bafcf@gmail.com>
<I6YF48WTjPJw4DuktwELspDFbDUvnquzGNUUbuukjGiAYfNR3jj1sZAW4wQbs78mRxr84HBbnUjNtj36Vj98nBMk0jvGzqmu3Y5ZH9Egfuw=@protonmail.ch>
<917520e4-0023-2842-db5f-2e1cbd72b004@gmail.com>
<741d4f14b64a45d7a9670042ac8ecf66@sud0.nz>
<77b0fb54-64f5-833d-19ba-2c731af1f700@gmail.com>
<20211025171342.GH20998@tamriel.snowman.net>
On 10/25/21 13:13, Stephen Frost wrote:
> No, it's not- you must also be sure to archive any WAL that's generated
> between the pg_start_backup and pg_stop_backup and then to be sure and
> add into the snapshot the appropriate signal files or recovery.conf,
> depending on PG version, to indicate that you're restoring from a backup
> and make sure that the WAL is made available via restore_command.
>
> Just doing stat/stop backup is*not* enough and you run the risk of
> having an invalid backup or corruption when you restore.
>
> If the entire system is on a single volume then you could possibly just
> take a snapshot of it (without any start/stop backup stuff) but it's
> very risky to do that and then try to do PITR with it because we don't
> know where consistency is reached in such a case (we*must* play all the
> way through to the end of the WAL which existed at the time of the
> snapshot in order to reach consistency).
>
> In the end though, really, it's much, much, much better to use a proper
> backup and archiving tool that's written specifically for PG than to try
> and roll your own, using snapshots or not.
>
> Thanks,
>
> Stephen
Stephen, thank you for correcting me. You, of course, are right. I have
erroneously thought that backup of WAL logs is implied because I always
back that up. And yes, that needs to be made clear.
Regards
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com
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: gogala.mladen@gmail.com, sfrost@snowman.net, root@sud0.nz
Subject: Re: ZFS filesystem - supported ?
In-Reply-To: <5608bbca-2bc6-57f1-8bcc-4b5f63eff2f6@gmail.com>
References: <49ijds_99IK_4iDOHuZH8CJsKGZw7DEVtJPf0s_oPEvUKwFewHcDQFCUnutcA9GYIkOrRfFAKRsyj0ZFN9ECAbLm-NYPR8jMxTl-RU-U3hA=@protonmail.ch> <1e0db1d2-6a9e-f5f7-44af-e7a1997bafcf@gmail.com> <I6YF48WTjPJw4DuktwELspDFbDUvnquzGNUUbuukjGiAYfNR3jj1sZAW4wQbs78mRxr84HBbnUjNtj36Vj98nBMk0jvGzqmu3Y5ZH9Egfuw=@protonmail.ch> <917520e4-0023-2842-db5f-2e1cbd72b004@gmail.com> <741d4f14b64a45d7a9670042ac8ecf66@sud0.nz> <77b0fb54-64f5-833d-19ba-2c731af1f700@gmail.com> <20211025171342.GH20998@tamriel.snowman.net> <5608bbca-2bc6-57f1-8bcc-4b5f63eff2f6@gmail.com>
* 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