Re: pg_xlogdump follow into the future

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_xlogdump follow into the future
Date: 2016-07-14 13:54:05
Message-ID: CANP8+jKF_rfN9RX+SjnSh6okFJmNX+SazgtKC5ioF9312ZFZHg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14 July 2016 at 07:46, Magnus Hagander <magnus(at)hagander(dot)net> wrote:

> Currently, if you run pg_xlogdump with -f, you have to specify an end
> position in an existing file, or if you don't it will only follow until the
> end of the current file.
>
> That seems like an oversight - if you specify -f with no end position, it
> should follow "into the future" for any new files that appear. This allows
> us to track what's happening properly.
>
> AFAICT the actual code tracks this just fine, but the option parsing
> prevents this from happening as it does not allow the end pointer to be
> unset. Attach patch fixes this and makes it follow "forever" if you specify
> -f without an end pointer.
>
> I'd appreciate a review of that by someone who's done more work on the
> xlog stuff, but it seems trivial to me. Not sure I can argue it's a bugfix
> though, since the usecase simply did not work...
>

Good thinking.

Patch looks good, but not tested. Needs comment on the second chunk.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-07-14 14:20:42 Re: Hang issue when COPY to/from an unopened FIFO
Previous Message Madusudanan.B.N 2016-07-14 13:52:18 Re: Unable to test parallel aggregate/joins in Postgres beta 2