pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christoph Berg <myon@debian.org>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Craig Ringer <craig.ringer@2ndquadrant.com>
Cc: Jim Nasby <Jim.Nasby@bluetreble.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: Renaming of pg_xlog and pg_clog
Date: Fri, 21 Oct 2016 14:03:27 -0400
Message-ID: <20161021180327.GE13284@tamriel.snowman.net> (raw)
In-Reply-To: <CA+TgmoZwKF+XhDiw2evy5EwHbqA3e66bmOaBWE1mERfWqGSZsw@mail.gmail.com>
References: <20161014113523.GZ13284@tamriel.snowman.net>
	<20161014171902.nb3hyg6koemwbzhb@msg.df7cb.de>
	<20161018220909.GA11661@momjian.us>
	<20161019110528.d5w7t6qnmpsosmjg@msg.df7cb.de>
	<CA+TgmoYWdoPqDA5Gd4o_rLqbk3-yCRvg3=b7BfkjVwJ_zR+0Ow@mail.gmail.com>
	<4861.1476978513@sss.pgh.pa.us>
	<20161020161216.GU13284@tamriel.snowman.net>
	<CA+TgmobbKvONjx9RWKn7Wj-nLQsNwW5qh8evncB8evmqdou_GQ@mail.gmail.com>
	<20161021134754.GZ13284@tamriel.snowman.net>
	<CA+TgmoZwKF+XhDiw2evy5EwHbqA3e66bmOaBWE1mERfWqGSZsw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

* 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       
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!'
 ?] 
---------------

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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (139+ messages)  latest in thread

Message-ID: <20161021180327.GE13284@tamriel.snowman.net>
Permalink:  ../20161021180327.GE13284@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20161021180327.GE13284@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: sfrost@snowman.net, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, myon@debian.org, bruce@momjian.us, peter.eisentraut@2ndquadrant.com, michael.paquier@gmail.com, thomas.munro@enterprisedb.com, craig.ringer@2ndquadrant.com, Jim.Nasby@bluetreble.com, andres@anarazel.de
  Subject: Re: Renaming of pg_xlog and pg_clog
  In-Reply-To: <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> <CA+TgmoYWdoPqDA5Gd4o_rLqbk3-yCRvg3=b7BfkjVwJ_zR+0Ow@mail.gmail.com> <4861.1476978513@sss.pgh.pa.us> <20161020161216.GU13284@tamriel.snowman.net> <CA+TgmobbKvONjx9RWKn7Wj-nLQsNwW5qh8evncB8evmqdou_GQ@mail.gmail.com> <20161021134754.GZ13284@tamriel.snowman.net> <CA+TgmoZwKF+XhDiw2evy5EwHbqA3e66bmOaBWE1mERfWqGSZsw@mail.gmail.com> <20161021180327.GE13284@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox