Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxeC8-0005SI-G6 for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Oct 2016 18:05:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bxeC7-0001a6-KB for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Oct 2016 18:05:27 +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 1bxeAk-0008PQ-Cn for pgsql-hackers@postgresql.org; Fri, 21 Oct 2016 18:04:02 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxeAg-0004r9-Ky for pgsql-hackers@postgresql.org; Fri, 21 Oct 2016 18:04:01 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 8BE375F7A2; Fri, 21 Oct 2016 14:03:27 -0400 (EDT) Date: Fri, 21 Oct 2016 14:03:27 -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: <20161021180327.GE13284@tamriel.snowman.net> References: <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> <20161021134754.GZ13284@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="c+qGut8k13HZAIeS" 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: 13:47:40 up 104 days, 19:11, 22 users, load average: 0.04, 0.05, 0.05 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 --c+qGut8k13HZAIeS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Robert Haas (robertmhaas@gmail.com) wrote: > I don't think that the problem is that people are accidentally typing > "pg_resetxlog $PGDATA" and pressing return. They're typing that on > purpose, and if you change the sequence of characters required to get > that effect, they'll just type the new thing instead. The problem is > that they don't understand when it's appropriate to use that command > and what the consequences are. I agree that they don't understand, and that's why I believe that making the command name, or a required option, a bit more ominous would make them pause and realize that maybe they want to consider other options first. This is not exactly unheard of- apt-get requires an entire phrase be to be entered when you're asking it to do something extremely dangerous (remove an essential package): --------------- root@ionith:~# apt-get remove login Reading package lists... Done Building dependency tree =20 Reading state information... Done The following packages will be REMOVED: login WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! login 0 upgraded, 0 newly installed, 1 to remove and 71 not upgraded. After this operation, 1,212 kB disk space will be freed. You are about to do something potentially harmful. To continue type in the phrase 'Yes, do as I say!' ?]=20 --------------- My thought would be to make pg_resetxlog do something more along the lines of what pg_control does and have it, by default, just investigate the state of things and complain about problems and then have it include an option to actually reset things with an appropriately ominous name. The goal there being, primairly, to give a way for users to get information about why PG isn't starting or what it is complaining about, with some additional information about what happens if they forcibly reset the xlog, noting that it could very likely cause corruption, etc. Thanks! Stephen --c+qGut8k13HZAIeS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYClhvAAoJEO1sijiDR2RVgb4QALA2QjbafZZ4F926j/8k6Y+n teTXHcG9tLtLkqr4CDQBjM62bpOsuKn2N9uLP9kKC/SEdRNMYUpWVKdTFldMy6DK l5myHqSS4uyFdDVqn2oTjA2//sJC9HRxJCyNT2RzY8VFwnevgiRvWRsvq8Ap8QFx sa3qpbQnZIfl+oczXod7+okrKIPuZYWULQsJSEB/X/JSsiurBcqGK8apYmpTiZhG ug2103ur5/xmhuYRA21G532iEC+RUT1N6GNVp5paaVFSQOelkKORpVS1TDWOj7ZU thvulj6LSCcYFgd7HyQhwp8czZ4VNi9O/P9LedwWeRirG14aNDtT4FbYTH/8swwu 1KVr4BLqZRIWskmTI7jvNWuBT2IY21O18lasZ5iak2Sc8z0xpi0fZzMkWmfmVPqX kEsWqiY1+6WYFr2TnoFO6P6E8JLZBzxA5UjK6EUbzPsxfPCwDwUJnUmc2yXfoE1q 5V1GRk2dHQRsTg34RtffDiK0QYq+UCj1wjn2JtZGCnpHWSMpWNfbsBSvtKUraLVT ICoimCuVWw8cqPnc+PkSeRBCThmKg0IDnAoxI6dCDXHEyOTqq4Dz3fFHHVQ0/0rW U7i5QsF8pHBO07lK8HU2jc2PX/gSQvAr8UbpPQvs4z92jcp1i/zb56Nc19ksAT9N DdtsxETx1Gxa6UxB0Avj =bN8J -----END PGP SIGNATURE----- --c+qGut8k13HZAIeS--