On 8/9/05 2:38 pm, "Alvaro Herrera" <alvherre@xxxxxxxxxxxxxx> wrote: > On Thu, Sep 08, 2005 at 10:32:41AM +0100, Adam Witney wrote: > >> Unfortunately the pg_filedump you requested gives an error: >> >> pg_filedump -R 165390 165392 134401986 >> >> ******************************************************************* >> * PostgreSQL File/Block Formatted Dump Utility - Version 3.0 >> * >> * File: 134401986.1 >> * Options used: -R 165390 165392 >> * >> * Dump created on: Thu Sep 8 10:33:47 2005 >> ******************************************************************* >> Error: Premature end of file encountered. >> >> (there is a .1 file also for this table, do I have to stick the two together >> or something?) > > No, rather tell pg_filedump to use the second segment (.1 file) and > substract the total number of blocks in the first segment. If my math > is right there are 131072 blocks of 8kB per 1GB segment, so to dump > block 165390 you need to ask for block 34318 in the second segment: > > pg_filedump -R 34318 34320 134401986.1 Ah thanks..... pg_filedump-3.0/pg_filedump -R 34318 34320 134401986.1 ******************************************************************* * PostgreSQL File/Block Formatted Dump Utility - Version 3.0 * * File: 134401986.1 * Options used: -R 34318 34320 * * Dump created on: Thu Sep 8 14:49:05 2005 ******************************************************************* Block 34318 ******************************************************** <Header> ----- Block Offset: 0x10c1c000 Offsets: Lower 36 (0x0024) Block: Size 8192 Version 1 Upper 272 (0x0110) LSN: logid 16 recoff 0x2b0ab37c Special 8192 (0x2000) Items: 4 Free Space: 236 Length (including item array): 40 <Data> ------ Item 1 -- Length: 2034 Offset: 6156 (0x180c) Flags: USED Item 2 -- Length: 2034 Offset: 4120 (0x1018) Flags: USED Item 3 -- Length: 1811 Offset: 2308 (0x0904) Flags: USED Item 4 -- Length: 2034 Offset: 272 (0x0110) Flags: USED Block 34319 ******************************************************** <Header> ----- Block Offset: 0x10c1e000 Offsets: Lower 36 (0x0024) Block: Size 8192 Version 1 Upper 48 (0x0030) LSN: logid 16 recoff 0x2b0ad4d0 Special 8192 (0x2000) Items: 4 Free Space: 12 Length (including item array): 40 <Data> ------ Item 1 -- Length: 2034 Offset: 6156 (0x180c) Flags: USED Item 2 -- Length: 2034 Offset: 4120 (0x1018) Flags: USED Item 3 -- Length: 2034 Offset: 2084 (0x0824) Flags: USED Item 4 -- Length: 2034 Offset: 48 (0x0030) Flags: USED Block 34320 ******************************************************** <Header> ----- Block Offset: 0x10c20000 Offsets: Lower 68 (0x0044) Block: Size 8192 Version 1 Upper 232 (0x00e8) LSN: logid 16 recoff 0x2d0fedcc Special 8192 (0x2000) Items: 12 Free Space: 164 Length (including item array): 72 <Data> ------ Item 1 -- Length: 672 Offset: 7520 (0x1d60) Flags: USED Item 2 -- Length: 668 Offset: 6852 (0x1ac4) Flags: USED Item 3 -- Length: 656 Offset: 6196 (0x1834) Flags: USED Item 4 -- Length: 652 Offset: 5544 (0x15a8) Flags: USED Item 5 -- Length: 700 Offset: 4844 (0x12ec) Flags: USED Item 6 -- Length: 652 Offset: 4192 (0x1060) Flags: USED Item 7 -- Length: 668 Offset: 3524 (0x0dc4) Flags: USED Item 8 -- Length: 656 Offset: 2868 (0x0b34) Flags: USED Item 9 -- Length: 684 Offset: 2184 (0x0888) Flags: USED Item 10 -- Length: 648 Offset: 1536 (0x0600) Flags: USED Item 11 -- Length: 652 Offset: 884 (0x0374) Flags: USED Item 12 -- Length: 652 Offset: 232 (0x00e8) Flags: USED *** End of Requested Range Encountered. Last Block Read: 34320 *** I have deleted the offending row in the table and now pg_dump does not give the error, so it seems to be fixed. I do have a copy of the toast.pg_toast_134401982 files 134401986 and 134401986.1 if you want me to do any further analysis for you? Thanks again for your help Adam -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.