Re: recovery testing for beta

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: recovery testing for beta
Date: 2014-06-02 17:29:33
Message-ID: 20140602172933.GD24145@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-06-02 17:36:52 Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?
Previous Message Robert Haas 2014-06-02 17:29:25 Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?