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 1jlxjP-00066w-UN for pgsql-general@arkaria.postgresql.org; Thu, 18 Jun 2020 16:49:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlxjO-0008Pm-Qd for pgsql-general@arkaria.postgresql.org; Thu, 18 Jun 2020 16:49:38 +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 1jlxjO-0008Pd-Fo for pgsql-general@lists.postgresql.org; Thu, 18 Jun 2020 16:49:38 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jlxjM-00011r-4O for pgsql-general@postgresql.org; Thu, 18 Jun 2020 16:49:37 +0000 Received: by mail-ej1-x644.google.com with SMTP id dp18so7114788ejc.8 for ; Thu, 18 Jun 2020 09:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Z6mHhJmOXLSim4B3u1E5vToXjxs2IyhP5SKm/vFyxVw=; b=lUTOjC1I+KrzC5ibh4Jp8wnJl2Ld95f/lhXAGbscIuaGjCuwh1It4QnZFdpScx4F8u j2/FmNJy4bpvLBCZjXUw5LSkxhbEBZR+OMVN+kWzaG2I1NIXnYxR08hBr76RsMxTSujX CW6Pgl5yeTzB4TIHqKZ1M8uygYD4OE10Ht/tZRyojfvPGHps7XjteIj1r/+1hiULLFm9 7kRr5DU9hQZ2yoC8hvWcW4vOhTPSEm7e1az+JFtoFPqBePXOTiaLacdAYnPwdjW4FAWo jnB8sdhPYgu2ZdqekDuCqEVJ+Y4KBH4TDi4NHV4+NkXeQTY6WTYw11fxim3W/RXZDaIm kwXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Z6mHhJmOXLSim4B3u1E5vToXjxs2IyhP5SKm/vFyxVw=; b=PogFIqRF+k2HcQ/dtjjTuoDt675wIhPxBgVGcjxCMLrWlri4s83woJjr6QX3L2EsMs qucajzsYRngP9EYagbM6f9EVnirjP08JUy0QugEO+HjOFjEudWAO6+MrSyUyR5ZinqKe zBzknqALQdS5IAj2mTLaCGIlujyt1y69JYfKLZPIwdkYUbkGIo95iUp/f0CGB+r5btL2 moP4E+o90JOrEvka8gsq0l2804vF3+Gi9c1YwvZndK1G5wgiRt+AUpe4h0YZmHRgkQGZ 25wi7r3NwIiylUKw3lc4RKo1BWWabVrAony36Fh7JwN87bS5hJ7AvI8/Ou+YXa7BhHhB S8Jw== X-Gm-Message-State: AOAM53111Fbv9Pg+mseBYmOUJhjD5NjJfEJshN/1f9zdPSo13L5mmQRh bblZWL4XdEVXHu09CC3KgYc= X-Google-Smtp-Source: ABdhPJxv+3BoNWzDXst9Wcz/6BN5mDBQICwHE1HqTQQF5iR/zdXPorv72C2TAKLHAA69A0DMWPOW4w== X-Received: by 2002:a17:906:e0cf:: with SMTP id gl15mr4974057ejb.501.1592498974674; Thu, 18 Jun 2020 09:49:34 -0700 (PDT) Received: from [192.168.1.8] (241-57-239-77.dyn.cable.fcom.ch. [77.239.57.241]) by smtp.gmail.com with ESMTPSA id p25sm2670749ejf.79.2020.06.18.09.49.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2020 09:49:34 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Netapp SnapCenter From: =?utf-8?Q?Paul_F=C3=B6rster?= In-Reply-To: Date: Thu, 18 Jun 2020 18:49:32 +0200 Cc: "Wolff, Ken L" , pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: <2C6D03C3-CFF0-4F14-BA83-A2809BA29196@gmail.com> References: <4D23B288-6A0B-4BDB-A723-FC47F2E832C7@gmail.com> To: Magnus Hagander X-Mailer: Apple Mail (2.3608.80.23.2.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Magnus, > On 18. Jun, 2020, at 16:19, Magnus Hagander = wrote: > I don't know specifically about SnapCenter, but for snapshots in = general, it does require backup mode *unless* all your data is on the = same disk and you have an atomic snapshot across that disk (in theory it = can be on different disk as well, as long as the snapshots in that case = are atomic across *all* those disks, not just individually, but that is = unusual). according to what I know from our storage guys, Netapp does atomic = snapshots for each volume. We have the database and its corresponding = WAL files (pg_wal directory) on the same volume and the archived WALs = (archive_command) on another. And the snapshots on those two volumes are = not taken at the same time. Currently, the database is set to backup = mode (using cron) and the storage guys have a window during which they = can take the snapshots. > So the upthread suggestion of putting data and wal on different disk = and snapshoting them at different times is *NOT* safe. Unless the = reference to the directory for the logs means a directory where log = files are copied out with archive_command, and it's actually the log = archive (in which case it will work, but the recommendation is that the = log archive should not be on the same machine). as I said above, pg_wal is a directory in PGDATA at the default location = and WALs are archived using the archive_command to a different volume. = So I guess, we should be safe then. > The normal case is that snapshots are guaranteed to be atomic, and = thus this millisecond window cannot appear. But that usually only = applies across individual volumes. It's also worth noticing that taking = the backups without using the backup mode and archive_command means you = cannot use them for PITR, only for restore onto that specific snapshot. >=20 > While our documentation on backups in general definitely needs = improvement, this particular requirement is documented at = https://www.postgresql.org/docs/current/backup-file.html. since we use backup mode, we should be good with PITR too. I didn't test = that myself, but a workmate did and he said it worked nicely. So bottom line, SnapCenter means for PostgreSQL just a plain volume = snapshot like we currently do with SnapCreator, using backup mode = scripts and "archive_command"-ing WALs to a diffent volume, i.e. no = change in strategy. It's just that SnapCenter can't control backup mode = as it can with Oracle. Thanks for the invaluable input. Also, thanks Ken. Cheers, Paul