* Robert Haas (robertmh...@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
signature.asc
Description: Digital signature