Re: pg_resetxlog options - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_resetxlog options
Date
Msg-id 13780.1030485671@sss.pgh.pa.us
Whole thread Raw
In response to pg_resetxlog options  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> pg_resetxlog uses a non-standard options parsing method: The -l option
> requires two arguments (-l fileid seg).  I propose to change this to -l
> fileid,seg which is the standard way to separate suboptions.

No objection.  I think pg_upgrade uses that option, so please adjust it
too.

> Secondly, the -n option appears to be redundant with pg_controldata.  Do
> we need it?

I would like to keep it.  It gives some comfort factor that pg_resetxlog
has chosen the right things to do, before it does them.

> Thirdly, pg_resetxlog uses the term "guessed" controldata values if it
> can't read the real ones.  I found this to be confusing, because the code
> doesn't do a whole lot of guessing.

There needs to be more AI in there than there presently is ;-), but I
think the term is quite appropriate.  Without a readable pg_control,
pg_resetxlog really is guessing at a number of critical data items,
such as the next transaction ID, the locale, etc.  I *want* the user
to be apprehensive if that flow of control is taken, and I think a term
like "guessed" will induce an appropriately paranoid frame of mind.
If you'd like to propose alternate wording, feel free, but "default" is
not it.  If I read "we used the default values", I'm going to think
everything is fine and no thought is required.  That's exactly the wrong
thing for a user of pg_resetxlog to think.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: Open 7.3 items
Next
From: Tom Lane
Date:
Subject: Re: turning off autocommit behavior in psql