Re: corrupted tuple (header?), pg_filedump output - Mailing list pgsql-hackers

From Tom Lane
Subject Re: corrupted tuple (header?), pg_filedump output
Date
Msg-id 29273.1111109170@sss.pgh.pa.us
Whole thread Raw
In response to Re: corrupted tuple (header?), pg_filedump output  (Eric Parusel <lists@globalrelay.net>)
List pgsql-hackers
Eric Parusel <lists@globalrelay.net> writes:
> Is this what you're speaking of?

> <Data> ------
>   Item   1 -- Length: 1756  Offset: 3200 (0x0c80)  Flags: USED
>   Item   2 -- Length: 1728  Offset: 6464 (0x1940)  Flags: USED
>   Item   3 -- Length: 1756  Offset: 1444 (0x05a4)  Flags: USED
>   Item   4 -- Length:  184  Offset: 1260 (0x04ec)  Flags: USED
>   Item   5 -- Length:  194  Offset: 1064 (0x0428)  Flags: USED
>   Item   6 -- Length:  164  Offset: 6300 (0x189c)  Flags: USED
>   Item   7 -- Length:    0  Offset: 1720 (0x06b8)  Flags: 0x00
>   Item   8 -- Length: 1344  Offset: 4956 (0x135c)  Flags: USED
>   Item   9 -- Length:    0  Offset: 1064 (0x0428)  Flags: 0x00

Well, scratch that theory: those offsets and sizes all seem perfectly
consistent (eg, one ends where the next begins, modulo some alignment
padding in one case).  So it's hard to credit that the itemid got
bombed; the corruption has to be in the tuple header itself.  What
does the hex dump of the tuple header and vicinity look like?

> Oh crap, I just noticed that there is more than just that item that's 
> inconsistent...

> Item   6 -- Length:  164  Offset: 6300 (0x189c)  Flags: USED
>    XMIN: 1852400896  CMIN: 1970348133  XMAX: 543424609  CMAX|XVAC: 
> 1869112179
>    Block Id: 1819244288  linp Index: 29295   Attributes: 2667   Size: 101
>    infomask: 0x7270 
> (HASOID|XMIN_INVALID|MARKED_FOR_UPDATE|UPDATED|MOVED_OFF)
>    Error: Computed header length not equal to header size.
>           Computed <32>  Header: <101>

> Item   8 -- Length: 1344  Offset: 4956 (0x135c)  Flags: USED
>    XMIN: 2100285  CMIN: 1644759593  XMAX: 1634148473  CMAX|XVAC: 2003137536
>    Block Id: 2036411953  linp Index: 103   Attributes: 28524   Size: 108
>    infomask: 0x6162 (HASVARWIDTH|XMIN_COMMITTED|UPDATED|MOVED_OFF)
>    Error: Computed header length not equal to header size.
>           Computed <28>  Header: <108>

Those look kinda clobbered too.  Maybe you should just send along the
whole -i -f page dump?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Eric Parusel
Date:
Subject: Re: corrupted tuple (header?), pg_filedump output
Next
From: Greg Stark
Date:
Subject: Re: Lockfile restart failure is still there :-(