
From wn@ELSA.de Fri Aug 27 21:01:39 1999
Date: Wed, 25 Aug 1999 12:26:07 +0100
From: Wolfgang Hottgenroth <wn@ELSA.de>
To: andre@via.ecp.fr
Cc: woho@ieee.org
Subject: problem with large-objects in postgreSQL 6.5.1



Very important, because I change my job. From 1.9. I work at uunet. (This
mail-system doesn't allow my to set reply-to in the header.)
Please reply-to: woho@ieee.org



Hi Pascal,


my name is Wolfgang and I use the postgreSQL-database-system.
Especially I do some work with the large-objects, which I use through the
Perl-library. Unfortunately since I switched from 6.4.2 to 6.5.1 my tools
refused to work. lo_import didn't work anymore.
I traced it down through the libpq, where I found that a test with
lo_lseek in the lo_open-function (file: fe-lobj.c) fails. Going deeper
into the source and drawing a trace of debug-output across some files I
switched tracing from the libpq to the backend.
Here I found in be-fsstubs.c, that after the function lo_open sets a
cookie using the function newLOfd, just this cookie will be cleared by
lo_commit, which is called by CommitTransaction (in xact.c). The handle,
handed out to the application by the library-function lo_open is now not
longer valid and the next access through this handle fails.

I attach the test-application (in Perl, named db_test), the debug-output
of the application (and the outputs in the libpq) (db_test2.log), the
debug-output of postmaster
(post2.log) and the files I patched with my debug-output (you will find
them easily because in every line I changed there is the string 'WN').

Did you ever see this problem? Is there something wrong with my
application (which works fine with 6.4.2)?

I hope you find time to have a look on the files and also I hope you can
help my. I want to use the postgreSQL on an Alpha, and 6.4.2 did not run
on the Alpha. (But don't be confused: all the test I did runs on an
Intel-Machine.)


Can you do something for my? Thank you!
Wolfgang Hottgenroth



(See attached file: post2.log)(See attached file: db_test)(See attached file:
db_test2.log)(See attached file: fe-exec.c)(See attached file: fe-lobj.c)(See
attached file: be-fsstubs.c)


  [Part 2, Application/OCTET-STREAM (Name: "post2.log")  4.5KB]
  [Unable to print this part]


  [Part 3, Application/OCTET-STREAM (Name: "db_test")  716bytes]
  [Unable to print this part]


  [Part 4, Application/OCTET-STREAM (Name: "db_test2.log")  4.9KB]
  [Unable to print this part]


  [Part 5, Application/OCTET-STREAM (Name: "fe-exec.c")  69KB]
  [Unable to print this part]


  [Part 6, Application/OCTET-STREAM (Name: "fe-lobj.c")  17KB]
  [Unable to print this part]


  [Part 7, Application/OCTET-STREAM (Name: "be-fsstubs.c")  17KB]
  [Unable to print this part]

