Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1faA1G-0007Ns-T3 for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jul 2018 01:22:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1faA1E-00017N-Ok for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jul 2018 01:22:12 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1faA1E-00017G-DL for pgsql-hackers@lists.postgresql.org; Tue, 03 Jul 2018 01:22:12 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1faA17-0001GH-SP for pgsql-hackers@postgresql.org; Tue, 03 Jul 2018 01:22:11 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4692521947; Mon, 2 Jul 2018 21:22:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 02 Jul 2018 21:22:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=YXKTW8Paofd47hjPNgBJblZ/uW/ExMGigjW2l302oME=; b=WaXBcA4o qcsQWIlNiBwEGDeDQL1s3PAG9ES7ZLP8fE/04KOR+hI6ZKRL8IHfwSTh2ObPt+Nw yD75DWAhDzKRO+wRIYZEHzhoshR/8cA8f2kSIzmfrngwvgE8ecb2kXbshX9o0Si9 HWylymycPNjSR5dDEu4Bb8ZfBKptX5lVtIgoHsLMG4y8odcl5vMfXaYXxWi9wSZV +/UlbkFypPxZszxKjaMLrCbzlSzLnPA/EFeKI6MkuM3cxSH6UaWY5lQI3qdq/NNR apNNf8AXK1obZ4DL8p0anOQ9dbY1cyFRXRJ/m+oC7FJuAkC/TqBRH20KcWF9Vzgh aqDJ3pxIn8/nSA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=YXKTW8Paofd47hjPNgBJblZ/uW/Ex MGigjW2l302oME=; b=Y3Hj4+f/PqrglsWrapuIJLwZEJFj4B03JB561XUwh1f92 h2OXaTGGnbHCjWB6iX52bIc5wxlzMuCw42wfM5SPZwvwpbtUDPm97k+8cznUKXfW JUrNNPcGo/uKoQ+XDOUQFDa+btLe9/bDqltSB/g+oUIse+p9yMLKur53fFC5CA8N 5MDRhLgMp1H/v7RtZ8I0Y+jm+CQxBYWZJc5OCUc33Uq/Qd9GS/c2jZLpZ1M3cQz5 ZKZae9CZJ4T2R/WasLlIXUw2OOrrAd/0cdzjtDqI3tmVXrrEuMee0ihgY8q+fH7z R9Zwgpyjd0qI94kkwmrfZTkNlLb6YiDxj2EqodRRA== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 1115AE4622; Mon, 2 Jul 2018 21:22:02 -0400 (EDT) Date: Tue, 3 Jul 2018 10:21:59 +0900 From: Michael Paquier To: "Yotsunaga, Naoki" Cc: "David G. Johnston" , Postgres hackers Subject: Re: automatic restore point Message-ID: <20180703012159.GE2159@paquier.xyz> References: <8E9126CB6CE2CD42962059AB0FBF7B0DBE3167@g01jpexmbkw23> <20180626051600.GC31353@paquier.xyz> <8E9126CB6CE2CD42962059AB0FBF7B0DBF3ACC@g01jpexmbkw23> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lteA1dqeVaWQ9QQl" Content-Disposition: inline In-Reply-To: <8E9126CB6CE2CD42962059AB0FBF7B0DBF3ACC@g01jpexmbkw23> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --lteA1dqeVaWQ9QQl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 03, 2018 at 01:06:31AM +0000, Yotsunaga, Naoki wrote: >> I'd rather spend effort making the initial execution of said commands >> less likely. > > I think that the function to prohibit DELETE and UPDATE without a > WHERE clause in the later response is good way. This has popped up already in the lists in the past. > But I think that it is impossible to completely eliminate the failure > of the other commands. For example, drop the wrong table. This kind of thing is heavily application-dependent. For example, you would likely not care if an operator, who has newly-joined the team in charge of the maintenance of this data, drops unfortunately a table which includes logs from 10 years back, and you would very likely care about a table dropped which has user's login data. My point is that you need to carefully design the shape of the configuration you would use, so as any application's admin would be able to cope with it, for example allowing exclusion filters with regular expressions could be a good idea to dig into. And also you need to think about it so as it is backward compatible. -- Michael --lteA1dqeVaWQ9QQl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAls6z7cACgkQnvQgOdby QH3fIw/9Hlprn/P+CmemM11FAKNTf+9c1Iz2m8fWXtaYtXRPIM80zK1aWCDw64ec AIeQa/z2oZrHmL2+zHVLzIzOhdMLmgbw9cIjw/6Bo41YwiO54dvNbCGNK+QvSAyD t9TKdwcpvswmJAPhbfc+Ml/IsGHfE+ng4tZPma8As1n3klb3qsGWtL5FqtaAr8Ld +bTDIThzYaRt94xE1EIzxzOspgtOGfHg2aD563zbPiYADLMoRmXRuYOCjaxQGMos 5Tl0CmXEsqAecX2XVFrKohsO7lGOfedb959htmLkN59sP5rdc/jSYZDLTCLassPE 4ENgL5V/qQvcoQ5sHfCopSqP5/Mq3xNFmnXusjOxgXf8d5+aVHOJavsA7keKu2ar ph9u/Scvxbx2I1abR2sSw8tDTDGgTpdNl3YBtNp6ITqF4n4gdDqgtkuIyvGK1uyv jAVJUq5SGCg/bhdbR/UIyu7vzhMNsA0LnrtNUz8vNpI3VtTxxiTg3yYoCFNNJC2p a6kueOoMs3xMzJEz2YQFKQCACK0Q+v3cPCIjYdnkZlS3rHMEITEcGj7P2HgdqwJ0 n3LhexGPa6eRUpFn22wt+tBGbzsoQvWw+La65WhOuygvDimdZtT0T7imupT/RbGb XjPvRIbloN4BAt8F307+bckmTwuyqZ/o3z7Wdc0ZiKLF7akOQCI= =3fgw -----END PGP SIGNATURE----- --lteA1dqeVaWQ9QQl--