X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 866C3D8798 for ; Thu, 8 Sep 2005 10:54:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03082-03 for ; Thu, 8 Sep 2005 13:54:00 +0000 (GMT) Received: from mailhub1.sghms.ac.uk (mailhub1.sghms.ac.uk [194.82.51.7]) by svr1.postgresql.org (Postfix) with ESMTP id D3E18D8724 for ; Thu, 8 Sep 2005 10:54:00 -0300 (ADT) Received: from [194.82.51.24] (helo=imail) by mailhub1.sghms.ac.uk with esmtp (Exim 4.24) id 1EDMqT-0001db-Q5; Thu, 08 Sep 2005 14:53:41 +0100 Received: from [172.16.20.3] (mrc1-003.sghms.ac.uk [172.16.20.3]) by imail.sghms.ac.uk (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005)) with ESMTPA id <0IMI006ZB3XH4A@imail.sghms.ac.uk>; Thu, 08 Sep 2005 14:53:41 +0100 (BST) Date: Thu, 08 Sep 2005 14:50:29 +0100 From: Adam Witney Subject: Re: pg_dump error... Follow up In-reply-to: <20050908133817.GD12971@surnet.cl> To: Alvaro Herrera Cc: Tom Lane , pgsql-admin , Michael Fuhr Message-id: MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT User-Agent: Microsoft-Entourage/10.1.1.2418 X-MailScanner-Information: Please contact sysadmin at sghms.ac.uk for more information X-MailScanner-MH1: No virueses detected X-MailScanner-SpamCheck: not spam, SpamAssassin (score=-5.399, required 5, autolearn=not spam, ALL_TRUSTED -3.30, BAYES_00 -2.60, MY_NO_QU 0.50) X-MailScanner-From: awitney@sgul.ac.uk X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.012 required=5 tests=[AWL=0.012] X-Spam-Level: X-Archive-Number: 200509/77 X-Sequence-Number: 18814 On 8/9/05 2:38 pm, "Alvaro Herrera" 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 ********************************************************
----- 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 ------ 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 ********************************************************
----- 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 ------ 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 ********************************************************
----- 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 ------ 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.