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 1fa9wE-000720-OA for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jul 2018 01:17: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 1fa9wC-0007cD-Pp for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jul 2018 01:17:00 +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 1fa9wC-0007c6-Ee for pgsql-hackers@lists.postgresql.org; Tue, 03 Jul 2018 01:17:00 +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 1fa9w8-000196-7H for pgsql-hackers@postgresql.org; Tue, 03 Jul 2018 01:16:59 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9CFC121B55; Mon, 2 Jul 2018 21:16:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 02 Jul 2018 21:16:55 -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=P16gE0bhHXERR6eVIqijjnhdVpTD0B7TeQMOA2nYKvg=; b=2h+NorE1 ZqummaBkzJYUxxYXNhRIRxHRhgaB57fwbm3ZscQw+qm7h2omAJpOvURybqIZg2lk YgA2HtxW3eUE0zcAsQYV3Z1e7wh5EdoNB5WgYaZqUYHGQzcq6KH2jjS8nAX5k1lP hQ62LYMZFOxS5COG1ETIcDGmsGu3B6aEENsYY99kUdA5Qu/3iR2UnoW7Y9qM+RNT BvLu2lXq/li2dxpPiQL9FTP9psCnvX6NKROPNoaCZ9df+gqZus/BTwZ7MLy1AiFu LnBQRY2yO4txXrZ5/UyP/ODh+eN9KnFAUVLbyachVUBm1AKelGTTjvUgdHav3y+F wOmPST2QBqvYzA== 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=P16gE0bhHXERR6eVIqijjnhdVpTD0 B7TeQMOA2nYKvg=; b=Vi9fY2EsiVOgcvRCtcmQtqjhkK6jPsxAl/M6PGJMeJuYY l2D6Ii8yGx3dvdGRTePs8L8NTdgPtPkIsv3kCW3xPBge6ac69lE7i847kd7rU7xJ 0vM0FQPzse0verAdjdNZxJLsry8Mq8uaJ+fkNqLQAmUu/yMiaNOHX7j9MkCehJGb xwaFOR8CBwd8J7Xb9/N2+iWDHndlVf5keEbZNaXkg5j1Kw8ikJofdS863whV/lmx SSm3bJ0ofmC/35n50wD3ZDjYvsV4ZuAOjO93FwiuvfXOXp3cWbg4AaLGPfNPAC2/ Fa0E+VDd8ET3ntzFMWayegTU66syS4iKZbEHRsf1Q== 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 CD4FB1025D; Mon, 2 Jul 2018 21:16:53 -0400 (EDT) Date: Tue, 3 Jul 2018 10:16:50 +0900 From: Michael Paquier To: "Yotsunaga, Naoki" Cc: Postgres hackers Subject: Re: automatic restore point Message-ID: <20180703011650.GD2159@paquier.xyz> References: <8E9126CB6CE2CD42962059AB0FBF7B0DBE3167@g01jpexmbkw23> <20180626053035.GD31353@paquier.xyz> <8E9126CB6CE2CD42962059AB0FBF7B0DBF3ADD@g01jpexmbkw23> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2iBwrppp/7QCDedR" Content-Disposition: inline In-Reply-To: <8E9126CB6CE2CD42962059AB0FBF7B0DBF3ADD@g01jpexmbkw23> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --2iBwrppp/7QCDedR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 03, 2018 at 01:07:41AM +0000, Yotsunaga, Naoki wrote: >> There is also recovery_target_lsn which is new as of v10. > In this method, it is necessary to look at a lsn position before operati= ng. > But I assume the user who did not look it before operating. > So I think that this method is not appropriate. You should avoid top-posting on the mailing lists, this breaks the consistency of the thread. >> So basically what you are looking for here is a way to enforce a >> restore point to be created depending on a set of pre-defined >> conditions? How would you define and choose those? > > I understand that I was asked how to set up a command to apply this funct= ion.=20 > Ex) DROP =3D on=20 > TRUNCATE =3D off > Is my interpretation right? > If my interpretation is correct, all the above commands will be > applied. > When this function is turned on, this function works when all the > above commands are executed.=20 Yeah, but based on which factors are you able to define that such conditions are enough to say that this feature is fully-compliant with user's need, and how can you be sure that this is not going to result in an additional maintenance burden if you need to define a new set of conditions in the future. For example an operator has issued a costly ALTER TABLE which causes a full table rewrite, which could be also an operation that you would like to prevent. Having a set of GUCs which define such low-level behavior is not really user-friendly. -- Michael --2iBwrppp/7QCDedR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAls6zoIACgkQnvQgOdby QH0aCw//azDnPhWWLNMyZubSuM5JKN3AZCzLa9WbgEozpm8UWp1Y9pMc67ybQ5xX cO8QP6Pi7KC34eDK7fAhNhufPYnmjIXNjCieI6SZlybwVMAJiGudlScZXu83SZOs PnS/OoLy4FYYcWr3hZub/ybIKB6XJnCDugvsvxMer1eyX7VysZxbCnuYCEs/6JQa +WeT2Qt5UH8NxccqTskMc2bIz5BhThhg2vWxGm5PpU0fAiY02BJyqGW3LZVxPY+Y 5UNEWLQHHEdVzlrW4s5oHM/ovfwzpnsviBKSIhHq5bZ1P2HbBjYo9SJ5j0SYYkJn jbg8LtQ/vDFxbuP80i0HBigN76DdglC5qxuujjB2e12dMeFtty+tAEkPDzHZzJ5c m3jr07+aI4eb8+YOe9rqOVcqYDcAiQNbxo4xhwk11aZJ/hccvJVFzJs2wFmWOYuW c7eQVNQmxy+3R1vaiSY4UiPB5xudhV3ilKY6K/cGJ8EkqV+ikGnJPJmtfCgExWtW iDYgHg7fmP74JehoDYEmZ+pFLYb06aUENrmFb0N5PUkQ1NTv1M+osWmuvGRBWqnv zuUU7pu/P/fReVKK/gFQtVzOcc877aOrsClOF5dbRy4+Rn/XhDf5aBHtAviHQo8E KKQr/2Yx3lKXjq4cVwHqfPHiezBR+4Le8ZTxTJvbmN1DAxdxE4k= =H9qI -----END PGP SIGNATURE----- --2iBwrppp/7QCDedR--