pg_xlogdump and .partial files

Started by Peter Eisentrautover 10 years ago2 messages
#1Peter Eisentraut
peter_e@gmx.net

The pg_xlogdump man page states that it cannot read .partial WAL files
and that they need to be renamed. It seems to me with about the same
number of lines we could just make it accept those files, no?

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Michael Paquier
michael.paquier@gmail.com
In reply to: Peter Eisentraut (#1)
Re: pg_xlogdump and .partial files

On Mon, Sep 28, 2015 at 9:47 AM, Peter Eisentraut <peter_e@gmx.net> wrote:

The pg_xlogdump man page states that it cannot read .partial WAL files
and that they need to be renamed. It seems to me with about the same
number of lines we could just make it accept those files, no?

FWIW, the discussion has happened here:
/messages/by-id/CAB7nPqS_X5-M+S9yo_xd7OxWq1ETVwV-1TsjUqNOVQYYAztReA@mail.gmail.com
In short, I was under the impression that this was not worth it, and I
still am under this impression knowing that this is not a common use
case.

Now, and I imagine that this is actually what is disturbing for the
user: we could allow the definition of a .partial file as an end
segment. We would need to be careful though in XLogDumpXLogRead when
doing the segment switch when the last segment is being read. As
pg_xlogdump does not handle timeline jumps this would be useful to
allow the user to have a look at the segments of a previous timeline
up to the point the promoted standby has switched to, particularly if
the .partial file, archived by a promoted standby, and its complete
version, archived by old master are present at the same position.
Still this seems like a very narrow use-case to me, so opinions are
welcome.
Regards,
--
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers