RE: [HACKERS] Re: SIGBUS in AllocSetAlloc & jdbc - Mailing list pgsql-hackers

From Peter Mount
Subject RE: [HACKERS] Re: SIGBUS in AllocSetAlloc & jdbc
Date
Msg-id A9DCBD548069D211924000C00D001C4422BBEF@exchange.maidstone.gov.uk
Whole thread Raw
List pgsql-hackers
[snip]

[ BTW, ImageViewer seems to make calls to following set of LOs *twice*
to display an image. Why?

lo_open
lo_tell
lo_lseek
lo_lseek
lo_read
lo_close
]

peter: Hmmm, I'll have to check this, but the first one may be the
application loading the image, and the second when AWT forces a reload.
I'm puzzled why its tell, lseek, lseek when I thought it should have
been lseek, tell, lseek as that's ImageViewer finding out the size of
the blob.

Possible solutions might be:

(1) do a context switching in lo_read/lo_write

(2) ask apps not to make LO calls between transactions

(3) close LOs fd at commit

(2) is the current situation but not very confortable for us. Also for
a certain app this is not a solution as I mentioned above. (3) seems
reasonable but people might be surprised to find their existing apps
won't run any more. Moreover, changings might not be trivial and it
make me nervous since we don't have enough time before 6.5 is
out. With (1) modifications would be minimum, and we can keep the
backward compatibility for apps.  So my conclusion is that (1) is the
best. If there's no objection, I will commit the change for (1).
---
Tatsuo Ishii

Peter: I've modified my local copy of ImageViewer to use transactions,
and should be committing it later today.

(3) Wouldn't break JDBC, but in my mind (1) looks the safest.

Peter

--
Peter T Mount, IT Section
petermount@it.maidstone.gov.uk
Anything I write here are my own views, and cannot be taken as the
official words of Maidstone Borough Council


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] "op must return bool to be used with subquery"?
Next
From: "J M Doren"
Date:
Subject: SQl Mail LIst (Spanish)