pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: postgresql.org@gclough.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13876: pg_xlogdump give an error on timeline switch
Date: Tue, 19 Jan 2016 15:34:48 +0000
Message-ID: <20160119153448.2961.55971@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      13876
Logged by:          Greg Clough
Email address:      postgresql.org@gclough.com
PostgreSQL version: 9.3.10
Operating system:   CentOS v7.2
Description:        

When pg_xlogdump encounters a timeline switch in WAL, it marks it as an
"error in WAL record".  I'm just guessing that there is an end-of-timeline
marker in the WAL that pg_xlogdump hasn't been programmed to recognize, so
it marks it as an error.

Here is a dump of WAL file that's had a timeline switch as the first thing
after forcing an pg_swtich_xlog():

-bash-4.2$ pwd
/opt/postgres/9.3/db2/pg_xlog

-bash-4.2$ ls -al
total 114704
drwx------.  3 postgres postgres     4096 Jan 19 09:15 .
drwx------. 16 postgres postgres     4096 Jan 19 09:33 ..
-rw-------.  1 postgres postgres 16777216 Jan 19 08:50
000000010000000000000002
-rw-------.  1 postgres postgres 16777216 Jan 19 08:53
000000010000000000000003
-rw-------.  1 postgres postgres 16777216 Jan 19 09:07
000000020000000000000003
-rw-------.  1 postgres postgres 16777216 Jan 19 09:07
000000020000000000000004
-rw-------.  1 postgres postgres 16777216 Jan 19 09:10
000000020000000000000005
-rw-------.  1 postgres postgres 16777216 Jan 19 09:15
000000020000000000000006
-rw-------.  1 postgres postgres       41 Jan 19 08:55 00000002.history
-rw-------.  1 postgres postgres 16777216 Jan 19 09:33
000000030000000000000006
-rw-------.  1 postgres postgres       83 Jan 19 09:15 00000003.history
drwx------.  2 postgres postgres       78 Jan 19 09:15 archive_status

-bash-4.2$ pg_xlogdump 000000020000000000000006
rmgr: XLOG        len (rec/tot):     72/   104, tx:          0, lsn:
0/06000028, prev 0/056370D0, bkp: 0000, desc: checkpoint: redo 0/6000028;
tli 2; prev tli 2; fpw true; xid 0/1894; oid 24576; multi 1; offset 0;
oldest xid 1879 in DB 1; oldest multi 1 in DB 1; oldest running xid 0;
shutdown
rmgr: XLOG        len (rec/tot):     72/   104, tx:          0, lsn:
0/06000090, prev 0/06000028, bkp: 0000, desc: checkpoint: redo 0/6000090;
tli 2; prev tli 2; fpw true; xid 0/1894; oid 24576; multi 1; offset 0;
oldest xid 1879 in DB 1; oldest multi 1 in DB 1; oldest running xid 0;
shutdown
pg_xlogdump: FATAL:  error in WAL record at 0/6000090: record with zero
length at 0/60000F8

That final message was mis-interpreted as corruption in the WAL, but without
knowing the internals of either the WAL or pg_xlogdump I can't say for sure
that it's not corruption.  It's repeatable, so I doubt it's a problem in
PostgreSQL core.

Could someone confirm my understanding, and if so, then could we please get
pg_xlogdump updated to recognize an end-of-timeline?


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



view thread (4+ messages)  latest in thread

Message-ID: <20160119153448.2961.55971@wrigleys.postgresql.org>
Permalink:  ../20160119153448.2961.55971@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20160119153448.2961.55971@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: postgresql.org@gclough.com
  Subject: Re: BUG #13876: pg_xlogdump give an error on timeline switch
  In-Reply-To: <20160119153448.2961.55971@wrigleys.postgresql.org>
  References: <20160119153448.2961.55971@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox