large objects failing (hpux10.20 sparc/solaris 2.6, gcc 2.8.1)

From: Ron Snyder <snyder(at)athena(dot)lblesd(dot)k12(dot)or(dot)us>
To: hackers(at)postgresql(dot)org
Subject: large objects failing (hpux10.20 sparc/solaris 2.6, gcc 2.8.1)
Date: 1999-02-18 14:13:53
Message-ID: 199902182213.OAA18452@athena.lblesd.k12.or.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Postgres 6.4.2, gcc 2.8.1, hpux 10.20 and Sparc/Solaris 2.6
(All debugging attempts were on the hpux machine, but the symptom also
occurs on the Solaris box. Also tried the latest (feb 18) snapshot
on the hpux box, symptom still occurs.)

I was installing the perl DBD::Pg module, but it fails the large object
test. To make sure it wasn't just an issue with perl (or the module),
I compiled and ran src/test/examples/testlo, and it also fails.
(testlo2 also has failed in the past, although I didn't use it for any
of my current debugging attempts.)

(In case there's any question, I created a database, and then created
a short text file called /tmp/gaga (ok, so I used the same file that
the perl module created for the perl test; you caught me) with one line of
text. Then I do:

./testlo ronfoo /tmp/gaga /tmp/gaga1

which fails complaining that there was an error reading the file (which
actually is misleading-- the error actually is in writing to the new
large object).

(after you do this, you must drop the database and recreate it before you
run testlo again, otherwise you get errors about creating the xinv#####
"object".)

I've put a comment before the line that seems to be the "offending" line,
I _don't_ know for sure what's wrong with it, just that the line before
the comment runs, and the line after the "offender" doesn't ever get
executed.

Is this a known problem with pg, or possibly a problem with gcc 2.8.1?
(or something else entirely?)

-ron

/*-------------------------------------------------------------------------
*
* IDENTIFICATION
* $Header: /usr/local/cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.41.2.1 1998/12/13 05:08:19 momjian Exp $
*
*-------------------------------------------------------------------------

[about line 1060]

/*
* Finally, copy the user's data buffer into the tuple. This violates
* the tuple and class abstractions.
*/

attptr = ((char *) ntup) + hoff;
/* XXX this next line is where things "just kind of stop" */
*((int32 *) attptr) = obj_desc->offset + nwrite - 1;
attptr += sizeof(int32);

[rest of file snipped]

Browse pgsql-hackers by date

  From Date Subject
Next Message Dennis Roesler 1999-02-18 14:25:24 list limit for IN predicate?
Previous Message Zeugswetter Andreas IZ5 1999-02-18 11:06:38 AW: [HACKERS] 8K block limit