Re: Renaming of pg_xlog and pg_clog

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Renaming of pg_xlog and pg_clog
Дата
Msg-id 20161021180327.GE13284@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Renaming of pg_xlog and pg_clog  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Renaming of pg_xlog and pg_clog  (Greg Stark <stark@mit.edu>)
Список pgsql-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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Renaming of pg_xlog and pg_clog
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: emergency outage requiring database restart