Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxaCp-0001wr-MX for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Oct 2016 13:49:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bxaCp-0003Id-9E for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Oct 2016 13:49:55 +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.84_2) (envelope-from ) id 1bxaBQ-0007ic-Je for pgsql-hackers@postgresql.org; Fri, 21 Oct 2016 13:48:28 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxaBN-0008Ut-NU for pgsql-hackers@postgresql.org; Fri, 21 Oct 2016 13:48:28 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 38A9B5F79F; Fri, 21 Oct 2016 09:47:54 -0400 (EDT) Date: Fri, 21 Oct 2016 09:47:54 -0400 From: Stephen Frost To: Robert Haas Cc: Tom Lane , Christoph Berg , Bruce Momjian , Peter Eisentraut , Michael Paquier , Thomas Munro , Craig Ringer , Jim Nasby , PostgreSQL Hackers , Andres Freund Subject: Re: Renaming of pg_xlog and pg_clog Message-ID: <20161021134754.GZ13284@tamriel.snowman.net> References: <15297.1476285726@sss.pgh.pa.us> <071f8400-b966-1a0b-9066-e5bb789189d7@2ndquadrant.com> <20161014113523.GZ13284@tamriel.snowman.net> <20161014171902.nb3hyg6koemwbzhb@msg.df7cb.de> <20161018220909.GA11661@momjian.us> <20161019110528.d5w7t6qnmpsosmjg@msg.df7cb.de> <4861.1476978513@sss.pgh.pa.us> <20161020161216.GU13284@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/o+sW0Khr0h/t9C5" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 09:23:51 up 104 days, 14:48, 22 users, load average: 0.18, 0.19, 0.12 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --/o+sW0Khr0h/t9C5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Robert Haas (robertmhaas@gmail.com) wrote: > On Thu, Oct 20, 2016 at 12:12 PM, Stephen Frost wrot= e: > > That said, I'd also like to see a --force or similar option or mechanism > > put in place to reduce the risk of users trashing their system because > > they think pg_resetwal is "safe." ("It's just gonna reset things to make > > the database start again, should be fine."). >=20 > You know we already have that, right? Yes, but I was meaning an option which would be required to make pg_resetxlog actually *do* anything. In other words, I'd rather have it report some info back to the user, if it's run without the '--really-force' or what-have-you option, and only proceed with clearing the WAL or rewriting pg_control when '--really-force' is used. > > pg_destroydb almost seems like a better choice, though I suppose > > 'pg_clearwal' would be more acceptable. Doesn't have quite the same > > impact though. > > > > Not sure on the best answer here, but it's definitely foot-gun that some > > users have ended up using on themselves with depressing regularity. >=20 > Just to provide some perspective from the other side of this, I [...] I wasn't suggesting that we remove the capability. There are certainly use-cases for it, but, unfortunately, I've seen a number of cases where users simply google'd an error that they got back when trying to start PG and found someone saying "well, I got this error, but then I ran pg_resetxlog, and now the database starts up again." It likely doesn't help that the top links tend to be to mailing list archives where pg_resetxlog was brought up. Thanks! Stephen --/o+sW0Khr0h/t9C5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYChyJAAoJEO1sijiDR2RVPmUQAJ74WmDm+0fQSAYkOPzqyR+E 6pxqCNa/veE8QN+fUYhioEHa8XAajpY/6cSAVA4fXLXl2WZFMEQ97eD/pLK8kNiZ pmDu8ZvU2klztqlvvw0tdjahW0bUJ+Vr8i9zVTynE70UFr2UBN7RMnNvm9e2xRzd fuC8jQ7a8oWTnkqGdCwHPrg1NhihhqRk+/lzVt4W3tBRRMmYMRm7bw+gE55vwwAO 9ebVkiFd4KCkcVEOpqwFavlvJsUfg+ll/EWXBGAKkknJaS0nRmGP3dNtBG19mbyi H8PPACqS9mDrQOXU3ou/gSqJMNnxugS+vM1GYrivaGKBc/Kk7QtNelX869Hlbh5o aMH2uuTv4rymm5cZP44Sg9VXJE5HFfrI6NAwG4OLsc9hf8h82TTyErEcLIGuvRGR Ywicphf6NPIv8YDc5F3iLkPEDeMr7z/TCHG29XdP0es1GqX4xlicsG+yMOp/bylH tSly2kGoLoKhryAUDBNQr6IF0C900pnoUqPKcOga/TshMLIJLPAOrGzGVq3vhktZ pQT2VrbXm+YNgP3Y+IB0tZxPGQ2LIvIcSs+1PsroFsWmvrU7pVM2cu4dUT09wqpN fDazKoUVB0vWq2KxZInVtF4JXEyi88f5/hSSxxlnRc1LJRzso7GTNXov0iZIBBK8 q9B4ZA2PID8hHn7ah7L4 =Qn// -----END PGP SIGNATURE----- --/o+sW0Khr0h/t9C5--