Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id CA1079FBD4C; Thu, 24 May 2007 03:42:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 71784-02; Thu, 24 May 2007 03:41:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id DA6C49FBD34; Thu, 24 May 2007 03:41:57 -0300 (ADT) Received: from server3.office.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 0DC8B74F04; Thu, 24 May 2007 07:41:56 +0100 (BST) Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id D3184274119; Thu, 24 May 2007 07:41:55 +0100 (BST) Message-ID: <465533B3.5060704@archonet.com> Date: Thu, 24 May 2007 07:41:55 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: Purusothaman A Cc: pgsql-general@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL. References: <3650d0d50705152242y689c0ef8u56223ec15661c821@mail.gmail.com> <464AD62B.9000003@archonet.com> <3650d0d50705230134n15b993aat8bbc631836eef65e@mail.gmail.com> <46540766.2030108@archonet.com> <3650d0d50705230756g5fdf8bdava3de463eb6f82ad9@mail.gmail.com> <4654621C.8010700@archonet.com> <3650d0d50705232254w265b94b0yaaf5163b92567403@mail.gmail.com> In-Reply-To: <3650d0d50705232254w265b94b0yaaf5163b92567403@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/258 X-Sequence-Number: 25578 Purusothaman A wrote: > Richard Huxton, > > Thanks for your detailed reply. > > I am maintaining various database of same kind in postgresql. > Here I have shown various corrupted last line of output of select * from > pg_largeobject where oid = xxxxxx; in 5 databases. > > I have used '\o e:\\filename.xml' before executing query and inspected the > output in that file. > > Kindly look at the end of line in all 5 outputs. > First 3 output shows few missing characters. > But last 2 output is the perfect one. > > 1. Output of SFRS2 database: > 2. Output of SFRS1 database: > 3. Output of FASP_AVT database: Let's have a look at the last few bytes of these three rows. For example, below is a very short file that finishes with "end". SELECT loid,pageno,length(data),encode(data, 'hex') FROM pg_largeobject WHERE loid=340161 AND pageno=0; loid | pageno | length | encode --------+--------+--------+---------------------------------------------------------------- 340161 | 0 | 31 | 54686973206973206120746573742066696c650a6c696e6520320a656e640a (1 row) It doesn't seem to be random garbage at the end of your rows, so lets see what it is. Oh - things we can rule out: 1. Index corruption. We're not missing the last row. Adding the length check above will show us if the row is truncated or full of spaces. -- Richard Huxton Archonet Ltd