Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.

From: Richard Huxton <dev(at)archonet(dot)com>
To: Purusothaman A <purusothaman(dot)a(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.
Date: 2007-05-24 06:41:55
Message-ID: 465533B3.5060704@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

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<NL>".

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Paolo Saudin 2007-05-24 06:44:18 Get the exeption error description
Previous Message Vishal Arora 2007-05-24 06:38:34 Re: how to view all database,tables,users

Browse pgsql-general by date

  From Date Subject
Next Message Paolo Saudin 2007-05-24 06:44:18 Get the exeption error description
Previous Message Purusothaman A 2007-05-24 05:54:05 Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.