Re: Recovery inconsistencies, standby much larger than primary

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Recovery inconsistencies, standby much larger than primary
Date: 2014-02-11 16:25:12
Message-ID: CAM-w4HP+je57sBtLBo5M1aGHk1Ld5Zh0QHe6gdXtzBK4=V6+=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 9, 2014 at 2:54 PM, Greg Stark <stark(at)mit(dot)edu> wrote:

> Bad block's page header -- this is in the 56'th relation segment:
>
> =# select (page_header(E'\\x20050000583b05aa050000002800180500200420000000001098e00f2090e00f088d24061885e00f0000000000000000')).*;
> lsn | tli | flags | lower | upper | special | pagesize |
> version | prune_xid
> --------------+-----+-------+-------+-------+---------+----------+---------+-----------
> 520/AA053B58 | 5 | 0 | 40 | 1304 | 8192 | 8192 |
> 4 | 0

> Looking at the block at offset 4773121 (which is in the 36th segment):
...
> d9de7pcqls4ib6=# select
> (page_header(E'\\x20050000a00a0bad050000002c00a00200200420000000001098e00f2090e00f088d24061885e00fa082ec040000000000000000....')).*;
> lsn | tli | flags | lower | upper | special | pagesize |
> version | prune_xid
> --------------+-----+-------+-------+-------+---------+----------+---------+-----------
> 520/AD0B0AA0 | 5 | 0 | 44 | 672 | 8192 | 8192 |
> 4 | 0
> (1 row)

And I finally tracked down the xlog record for this stray write:

[cur:520/AA051FE0, xid:7635428, rmid:10(Heap), len/tot_len:21/7005,
info:8, prev:520/AA051F20] insert: s/d/r:1663/16385/16650
blk/off:4773121/4 header: none
[cur:520/AA051FE0, xid:7635428, rmid:10(Heap), len/tot_len:21/7005,
info:8, prev:520/AA051F20] bkpblock[1]: s/d/r:1663/16385/16650
blk:4773121 hole_off/len:40/1264

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-02-11 16:28:36 Re: [PERFORM] encouraging index-only scans
Previous Message Robert Haas 2014-02-11 16:22:24 Re: Changeset Extraction v7.5