pg_xlogdump follow into the future

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_xlogdump follow into the future
Date: 2016-07-14 11:46:23
Message-ID: CABUevEyvHFZTcVgztAU2zAwOoro=2a_92EAVjdKLAUsfz9H1Hw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

Attachment Content-Type Size
xlogdump_future.patch text/x-patch 1011 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message AMatveev 2016-07-14 12:14:53 Re: One process per session lack of sharing
Previous Message Etsuro Fujita 2016-07-14 11:40:57 Re: Oddity in handling of cached plans for FDW queries