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

From Jeff Janes
Subject Re: recovery testing for beta
Date
Msg-id CAMkU=1x7z6tTD27N+J1AQVwRKM4RTNRLZ9uptubrEFb-xERBNA@mail.gmail.com
Whole thread Raw
In response to Re: recovery testing for beta  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: recovery testing for beta  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Mon, Jun 2, 2014 at 9:14 AM, Andres Freund <andres@2ndquadrant.com> wrote:
Hi,

On 2014-06-02 09:03:25 -0700, Jeff Janes wrote:
>
> GNU make does not realize that pg_xlogdump depends
> on src/backend/access/rmgrdesc/heapdesc.c.  (I don't know how or why it has
> that dependency, but changes did not take effect with a simple "make
> install") Is that a known issue?  Is there someway to fix it?

Hm. I can't reproduce this here. A simple 'touch heapdesc.c' triggers a
rebuild of pg_xlogdump for me. Could you include the make output?

Sorry, total user error.  I forgot that pg_xlogdump was in contrib, not in core-core.  "make -C contrib install" does rebuild it. I guess what I really want then is a target that builds and installs src and contrib but not docs, so I could train my fingers to use that.
 

> 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.

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.  

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.

If there is a magic combination of command line to do what I want, I can't find it.  If there isn't, what would be the right way to implement it?  -p without a -s would seem like the most obvious, but just giving the directory as the sole option would also be intuitive to me.

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: recovery testing for beta
Next
From: Robert Haas
Date:
Subject: Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?