Re: recovery testing for beta - Mailing list pgsql-hackers

From Andres Freund
Subject Re: recovery testing for beta
Date
Msg-id 20140602172933.GD24145@awork2.anarazel.de
Whole thread Raw
In response to Re: recovery testing for beta  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Hi,

On 2014-06-02 10:15:19 -0700, Jeff Janes wrote:
> > > Also, pg_xlogdump -p .... insists on being given a start position.  I
> > would
> > > be nice if it could just find the first file in the given directory.  Any
> > > reason it can't do that, other than just that no one implemented it yet?
> >
> > It actually should accept getting a file passed instead of -s/-e.
> > pg_xlogdump [OPTION]... [STARTSEG [ENDSEG]]
> > That doesn't work for you?
> >
> 
> The STARTSEG does not seem to be optional, unless you specify both -p and
> -s.  I don't think there is a very good command-line synopsis for such
> conditional dependencies--I think you are following the tradition here, in
> that if something is optional under any normal circumstances then it is put
> in brackets.

Maybe I have misunderstood what you actually want. You said:

> I would be nice if it could just find the first file in the given
> directory.

You mean it should scan the pg_xlog directory and find the numerically
oldest segment and start to decode from there?

> If I give for STARTSEG a path to the data directory or the pg_xlog
> directory instead of to a specific xlog file then I get bizarre error
> messages like:
>
> pg_xlogdump: FATAL:  could not find file "000000DA00C2C91500000080": No
> such file or directory
> (There is no timeline DA, nor C2C915 segments).  So STARTSEG cannot be a
> directory, which makes sense though the error message could be better.

Hm. Yes, that's clearly suboptimal. Will look if I can make it return a
more sensible error message.

> If I specify the full path of the first real log file as STARTSEG, it
> works.  But it is annoying to have to figure out what the first valid file
> in the directory is, then hope it hasn't changed while I type the command.
>  It is less annoying on an idle system or a snapshot, but it even there I'd
> rather not provide information that can be safely inferred.

I don't think it actually can be safely inferred in a trivial
manner... I guess a mode that reads the control file and starts with
values - including the timelineid - from there would be helpful.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?
Next
From: Tom Lane
Date:
Subject: Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?