Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DC6459FA603 for ; Wed, 23 May 2007 11:56:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49110-03 for ; Wed, 23 May 2007 11:56:23 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.249]) by postgresql.org (Postfix) with ESMTP id 5E0C49FAC9B for ; Wed, 23 May 2007 11:56:23 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so52700ana for ; Wed, 23 May 2007 07:56:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=eqyrnzKtkM1cDV1Qb1vFHX2vZ/GtlUCADEUa/nuWELpqEf8kZ/1VquIOXGulGBq1o89SDFCT/8Pa/9HuKJ+E7bCvaA2HbU0PQQAoayTvs8ruuP+zTXyZoE5h4+1TZ1uA0oOsyNVL4q2WAcd373XvDqjX/tx6uFRCv3gB1pYLnmg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=oaceJzGVxr7XPsDxzJ5fDk3K72HueUs21n4m7nN6IUef5mMKkBVzEYpxgnc+4JyukiRFosxgV2OWz1Czpj+UagMdbb5hJ5R/j9UXIL0aqBccbqp7ucSY/SLWrieenz30z+OsObPL5CkT82OslcbymY/w4RFVo6ZkvwbO2F8VP/w= Received: by 10.90.113.20 with SMTP id l20mr520313agc.1179932181169; Wed, 23 May 2007 07:56:21 -0700 (PDT) Received: by 10.90.86.9 with HTTP; Wed, 23 May 2007 07:56:21 -0700 (PDT) Message-ID: <3650d0d50705230756g5fdf8bdava3de463eb6f82ad9@mail.gmail.com> Date: Wed, 23 May 2007 20:26:21 +0530 From: "Purusothaman A" To: "Richard Huxton" Subject: Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL. Cc: pgsql-general@postgresql.org, pgsql-admin@postgresql.org In-Reply-To: <46540766.2030108@archonet.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_69127_29541725.1179932181125" References: <3650d0d50705152242y689c0ef8u56223ec15661c821@mail.gmail.com> <464AD62B.9000003@archonet.com> <3650d0d50705230134n15b993aat8bbc631836eef65e@mail.gmail.com> <46540766.2030108@archonet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/251 X-Sequence-Number: 25571 ------=_Part_69127_29541725.1179932181125 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear Richard Huxton, Thanks for your quick reply. only the first 3 values(HX, MASK, Rockey4ND) are file object's oid value. the other two are are not oid values. I have shown original output values displayed by postgresql client. I can explain more. 1. HX is a XML file. after downloading that file I opened that file in word pad application. In that I have noticed that nearly 20 characters of last line lost. 2. Rockey4ND is a dll file. I was unable to use that dll in my application. In both cases, I checked file size. Corrupted files are smaller when compare to the original one what I uploaded to postgresql. Usually this problem arises only after the database become large. Any suggestion to rectify this problem would be nice of you. Thanks. Regards, Purusothaman A On 5/23/07, Richard Huxton wrote: > > Purusothaman A wrote: > > Thanks Richard Huxton for your reply. > > > > I use client side api for uploading and downloading files. > > > > Its not happening immediately. But when database grows with data, file > > object got corrupted. > > Yes, but *HOW* - is it a different file, length is different, what? > > > My table structure is as follows. > > Table "public.conf" > > Column | Type | Modifiers > > --------+------------------------+----------- > > key | character varying(50) | not null > > value | character varying(100) | > > Indexes: > > "conf_pkey" PRIMARY KEY, btree ("key") > > > > Content of this table is, > > key | value > > ---------------------+-------- > > HX | 101800 > > MASK | 101801 > > Rockey4ND | 101802 > > Threshold | 60 > > Authentication Mode | 2 > > (5 rows) > > > > In the above, value of HX, MASK, Rockey4ND is 101800, 101801, 101802 > (which > > was returned by lo_import()); > > I find it unlikely that "2" and "60" were returned by lo_import() as > OIDs available for large-objects. You've either got: > 1. Some other part of your application(s) overwriting "value" > 2. Old data still in "value" > 3. On-disk corruption due to crashes/hardware malfunction. > 4. You're not showing real values > > > Actually for some peculiar reason I kept "Value" field as var char > instead > > of oid. (this could be reason?...) > > Hmm - well it's clearly not right, but I don't see how it can cause > errors like this. > > > This problem occurs only few weeks after uploading files. > > You still haven't said precisely what the problem is. > > -- > Richard Huxton > Archonet Ltd > -- http://PurusothamanA.wordpress.com/ ------=_Part_69127_29541725.1179932181125 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear Richard Huxton,

Thanks for your quick reply.

only the first 3 values(HX, MASK, Rockey4ND) are file object's oid value. the other two are are not oid values.

I have shown original output values displayed by postgresql client.

I can explain more.

1. HX is a XML file. after downloading that file I opened that file in word pad application.
In that I have noticed that nearly 20 characters of last line lost.
2. Rockey4ND is a dll file. I was unable to use that dll in my application.

In both cases, I checked file size. Corrupted files are smaller when compare to the original one what I uploaded to postgresql.

Usually this problem arises only after the database become large.

Any suggestion to rectify this problem would be nice of you.

Thanks.

Regards,
Purusothaman A

On 5/23/07, Richard Huxton <dev@archonet.com> wrote:
Purusothaman A wrote:
> Thanks Richard Huxton for your reply.
>
> I use client side api for uploading and downloading files.
>
> Its not happening immediately. But when database grows with data, file
> object got corrupted.

Yes, but *HOW* - is it a different file, length is different, what?

> My table structure is as follows.
>             Table "public.conf"
> Column |          Type          | Modifiers
> --------+------------------------+-----------
> key    | character varying(50)  | not null
> value  | character varying(100) |
> Indexes:
>    "conf_pkey" PRIMARY KEY, btree ("key")
>
> Content of this table is,
>         key         | value
> ---------------------+--------
> HX                  | 101800
> MASK                | 101801
> Rockey4ND           | 101802
> Threshold           | 60
> Authentication Mode | 2
> (5 rows)
>
> In the above, value of HX, MASK, Rockey4ND is 101800, 101801, 101802 (which
> was returned by lo_import());

I find it unlikely that "2" and "60" were returned by lo_import() as
OIDs available for large-objects. You've either got:
1. Some other part of your application(s) overwriting "value"
2. Old data still in "value"
3. On-disk corruption due to crashes/hardware malfunction.
4. You're not showing real values

> Actually for some peculiar reason I  kept "Value" field as var char instead
> of oid. (this could be reason?...)

Hmm - well it's clearly not right, but I don't see how it can cause
errors like this.

> This problem occurs only few weeks after uploading files.

You still haven't said precisely what the problem is.

--
   Richard Huxton
   Archonet Ltd



--
http://PurusothamanA.wordpress.com/ ------=_Part_69127_29541725.1179932181125--