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 1g6oyg-0008KG-MW for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Oct 2018 03:34:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g6oye-0007iP-IO for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Oct 2018 03:34:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g6oye-0007iH-7o for pgsql-hackers@lists.postgresql.org; Mon, 01 Oct 2018 03:34:32 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g6oyb-0001Jh-2q for pgsql-hackers@postgresql.org; Mon, 01 Oct 2018 03:34:31 +0000 Received: by mail-qt1-x844.google.com with SMTP id u34-v6so1942763qth.3 for ; Sun, 30 Sep 2018 20:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=dUNKKqdM6QXYGOh2uDJZ7R20vPoXMLv+agcnRQD+twc=; b=HEKgXxnlqHpOxbqOKJLKSp5TOOPw0ONG1XZ07QWYZB+FtfHJWmz+fF8FN4QkJk1oMo a8IO0TldzhADG+Jry7tbDqm4Ml1NO7Sc6Pyo8M2stDSzia1KEwKLed8NehrKA2pRuhUT W/j82lz6WHk/7holjC6R65yAgez6t75pSWiH3aH3kJXgSGVInS982t6NCseqrXkimoSt /ONcHOfDOvVK0GkK0aV3m71JzlOR2sZ0+CtGJkHKfsbGFOF0IzUzSkkzBBWuPgOwOyjZ Aq5kIyZTceRB5v3H8948kD8cjQ4gLVyJgJVbXMHGHSshYZgOUGfTYeGAjkraX9KeCt53 1WKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=dUNKKqdM6QXYGOh2uDJZ7R20vPoXMLv+agcnRQD+twc=; b=Jckuj1uzSDAswnAy4SXNp3NwijjRL7vwRlJXzi17nDuqk/eu9PpkynX88y7/0aYPgo I/nmbXaCTXGx+UyNvtbdS1WJpZUkzX8iwLA7Yq6GG98JzWf3dbAm4fULjfL3jL4DLRDM nZiUYkvij8YgVe/u2+n7zca7rr7sssRWzPlWQ0SQAAa14KVwAM2NQzv1Q6bH54LFl/gq AAle/61YUjpC+Tp1IzODTUr5g/B79tjEmU432XXLCR4+CWTv4T6nZl8DaOhWWKS5xyg9 QnMH9mGWK7XlsuOrIq++4ks/NH71YRO9HIa8pMFah+zoHAhvnkJkpwG9d920oe+sb2ti L73g== X-Gm-Message-State: ABuFfohIQY05XmFByjhHQYdzeLpMMWQGn/7nj29wT4hGhEP7wCnXhiKM 8/+qMO0s0sakcID0L/VewHbB8dMI4zE= X-Google-Smtp-Source: ACcGV63TflxG1jaTG1kjFeLa7RXXSPjvAVhtBh6aNbTWRAorCOoamg9nzYcrjWmhYBoqsqa3RHdZ2A== X-Received: by 2002:a0c:f906:: with SMTP id v6-v6mr7090290qvn.86.1538364866792; Sun, 30 Sep 2018 20:34:26 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.56.48.211]) by smtp.gmail.com with ESMTPSA id p7-v6sm5046657qkp.73.2018.09.30.20.34.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Sep 2018 20:34:25 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id A074D560; Mon, 1 Oct 2018 00:34:23 -0300 (-03) Date: Mon, 1 Oct 2018 00:34:23 -0300 From: Alvaro Herrera To: Michael Paquier Cc: Peter Eisentraut , "Yotsunaga, Naoki" , 'Postgres hackers' Subject: Re: automatic restore point Message-ID: <20181001033423.xtc7jckr74good2n@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180930124510.GB1763@paquier.xyz> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Sep-30, Michael Paquier wrote: > On Fri, Sep 28, 2018 at 09:13:17PM +0200, Peter Eisentraut wrote: > > I think this should be done using event triggers. Right now, you just > > have it hardcoded to TRUNCATE and DROP TABLE, which seems somewhat > > arbitrary. With event triggers, you have the full flexibility to do > > what you want. You can pick which commands to apply it to, you can log > > the LSN, you can create restore points, etc. > > I still unfortunately don't see what this patch brings more that you > cannot do. Event triggers are particularly useful in this prospective, > so I am marking the patch as rejected. I don't see it as clear cut as all that ... particularly considering that a useful event trigger runs *after* the DDL command in question has already written all its WAL, so such a restore point would be completely useless. (Or are ddl_command_start event triggers useful enough?) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services