Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iMVq1-0003Vm-Ua for pgsql-general@arkaria.postgresql.org; Mon, 21 Oct 2019 11:27:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iMVq0-0005Ba-Ae for pgsql-general@arkaria.postgresql.org; Mon, 21 Oct 2019 11:27:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iMVpz-0005Am-SE for pgsql-general@lists.postgresql.org; Mon, 21 Oct 2019 11:27:00 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iMVpw-0001fU-V7 for pgsql-general@lists.postgresql.org; Mon, 21 Oct 2019 11:26:58 +0000 Received: by mail-wr1-x443.google.com with SMTP id z9so13514075wrl.11 for ; Mon, 21 Oct 2019 04:26:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ocado.com; s=google; h=reply-to:subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mVt1AD8OpVVxliJWg0rTleTCMvOBK5+0IN47Amths6E=; b=SWW3E8mpIBQDvs8XZRJCHAGONOlAvRvVY0iQkbpQBLVubJN+sInInA+RoWnwl1fo8Y 59swSpiwsHVG0jQHah9civMVZMRThkTaIsrl3H5or2v5dg5E79WBv1ilTGRcg8gLYGXa IMsYF0ALp87dJdHow3/92xKM6zPr2mInonlIiAUhVQwv7fjfuz3JcK6v8GZyDQzDjgLs R8lLwxqV0kdd4YXO+Ra6WVs4UApERm/Kn4s5ibLd8OIjJqYcE6/sULRtB4NogDTGElPW o4zTilg9BSKVslbegYtvbOaQD/J9Fq598iLSf7PrL6GVxi519EPq0uV1BuSb3HJWnR4v N/ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=mVt1AD8OpVVxliJWg0rTleTCMvOBK5+0IN47Amths6E=; b=KRnOUqE2q2VEzbKW5JUsJyngamwPmv8vqXaZH+/O3gtxczMZ0oHzWu+ZJrVkV3Ilq5 K/TCBwMc0ORGT2G9DlnwKBpMVAJK0229MTlGUvmkxwM4j5vGhxIbij9E7k2sYCtQ+vo5 dhT4tS8sEAagEzz4IkDaZueMtsjuRAR6T8ticzWzm0tEWqIDVwjK749MVyBcwgrGTjfC er07bErpc6W/jO2Ug9t9GWoyGOEv808mQBMR7mvKVIolPwSJsqXZmllU9LiiwC6WRVYi Yd2sKmuA1QoI/M/RE4fTFwpaomrhFb2Yz7sVu0NbDovFf8yy01gGVyWihfHsblrBpE1c W3EQ== X-Gm-Message-State: APjAAAU+jnaOOrk79/IrHtpTsDg2lMzrynMyErANOJJQvqU9/Gct1WJl cFf4nAIN099v/KS0KOQutd3bndTkStIBbPCyDb1rD4pvVxQzkcauG8QsGkDzF1TzkZmhpx8EzP2 BRZJhxkk6LylwHHMQ6QKUUSlDOpERfw== X-Google-Smtp-Source: APXvYqxEawxEEsjJ2e65Uv9AHO6YYv88tVqXoD14ateJ0uTTsYWkmETJWKWMrqQYAthl2rA7PJibVQ== X-Received: by 2002:a5d:4ace:: with SMTP id y14mr13962564wrs.131.1571657215080; Mon, 21 Oct 2019 04:26:55 -0700 (PDT) Received: from [10.62.14.68] ([91.206.0.63]) by smtp.gmail.com with ESMTPSA id j63sm16194881wmj.46.2019.10.21.04.26.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Oct 2019 04:26:54 -0700 (PDT) Reply-To: f.venchiarutti@ocado.com Subject: Re: Postgres Point in time Recovery (PITR), To: Avinash Kumar Cc: Luca Ferrari , Daulat Ram , David Steele , Andreas Joseph Krogh , "pgsql-general@lists.postgresql.org" References: <3ff2963f-daab-81d4-ab1a-569fe1c8857b@pgmasters.net> From: Fabio Ugo Venchiarutti Organization: Ocado Technology Message-ID: <9081a471-6c65-6e89-e43f-a07ec6027cbe@ocado.com> Date: Mon, 21 Oct 2019 12:26:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 21/10/2019 12:10, Avinash Kumar wrote: >=20 >=20 > On Mon, Oct 21, 2019 at 4:19 PM Fabio Ugo Venchiarutti=20 > > wrote: >=20 > On 21/10/2019 09:52, Luca Ferrari wrote: > > On Sat, Oct 19, 2019 at 7:46 PM Daulat Ram > > wrot= e: > >> One more questions is, how backups are useful if we have > streaming replication . As I know, we can promote the standby as > primary in case of disaster at primary side. Do we need to schedule > backups if we have streaming replication? > > > > Let's speculate a little on that: do you need backups if you have = a > > RAID-1 configuration? > > Replication helps you reduce almost to zero the time to handle a > > disaster, backups allow you to recover in a more large time window= . > > > > Luca > > > > >=20 >=20 > TBH I hear this argument more often than I wish. >=20 >=20 > Offline backups and data replication are nearly entirely orthogonal.= =20 >=20 >=20 >=20 > Any form of instantaneous redundancy (RAID, instantaneous replication > and so on) primary is a mitigation measure to protect data & > availability against loss of infrastructure. >=20 >=20 > Backups (preferably with PITR) also do that, but that's not their > primary purpose unless you can't afford live redundancy on top of the= m. >=20 >=20 > Offline backups address many failure scenarios that any form of live > replication is defenseless against (eg: logical damage to the data as= a > result of human errors/bugs/vandalism would hit all your replicas, bu= t > you always can perform DR from a backup). >=20 > I think we are way ahead of the days where we need to live on Offline=20 > backups involving downtimes. > Today, we have several Online Consistent Backup solutions such as=20 > pg_basebackup (built-in with PG), pgBackRest, BARMAN, WAL-G etc .... > Online Consistent Backups=C2=A0+ Archiving of WALs are perfectly reliable= . > We need to ensure that we have safe backup locations, for example, push= =20 > them to AWS S3 and forget about redundancy. > Why do you think only Offline Backups are reliable today ? >=20 >=20 >=20 > Delayed replicas, or any online rollback capability (such as pg_rewin= d > off the server's own pg_wal or Oracle's flashback), somewhat live in = a > grey area in between, and their effectiveness varies depending on whi= ch > level was compromised. >=20 > What if you delay your replica by a day, before you making a change=20 > tomorrow (that may need a rollback). Delayed Replica is for emergencies= =20 > IMO and of course does not satisfy every possible scenario. >=20 >=20 Trade-offs come down to individual implementers, so fair enough. Our biases must come from different use cases/experience: a good=20 fraction of recovery/sanitisation operations I had to carry out were=20 very selective/application specific and involved buildup of anomalies=20 over time, sometimes months. Wouldn't have been possible without an old frozen reference for users to=20 compare with, and that hat to come from very cold storage. --=20 Regards Fabio Ugo Venchiarutti OSPCFC Network Engineering Dpt. Ocado Technology --=20 Notice:=20 This email is confidential and may contain copyright material of=20 members of the Ocado Group. Opinions and views expressed in this message=20 may not necessarily reflect the opinions and views of the members of the=20 Ocado Group. If you are not the intended recipient, please notify us=20 immediately and delete all copies of this message. Please note that it is= =20 your responsibility to scan this message for viruses. References to the=20 "Ocado Group" are to Ocado Group plc (registered in England and Wales with= =20 number 7098618) and its subsidiary undertakings (as that expression is=20 defined in the Companies Act 2006) from time to time. The registered office= =20 of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way,=20 Hatfield, Hertfordshire, AL10 9UL.