diff options
author | Barry Lind <barry@xythos.com> | 2002-07-05 18:50:27 +0000 |
---|---|---|
committer | Barry Lind <barry@xythos.com> | 2002-07-05 18:50:27 +0000 |
commit | f170e61d9baf794ec2301b0eed168f3cefbab862 (patch) | |
tree | 64d4f0e2e81a725b48bf8ab554bd05fc0cc25888 /src | |
parent | fe92e018d7939ff1b54d676681f0c39f5b261487 (diff) | |
download | postgresql-f170e61d9baf794ec2301b0eed168f3cefbab862.tar.gz postgresql-f170e61d9baf794ec2301b0eed168f3cefbab862.zip |
fixed bug reported by Michael, Dietrich (mdt@emdete.de) where a large object handle was being used after the end of the transaction and thus resulting in an error.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java b/src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java index f5eab8310f7..5910482bffc 100644 --- a/src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java +++ b/src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java @@ -92,7 +92,12 @@ public class LargeObject /* Release large object resources during garbage cleanup */ protected void finalize() throws SQLException { - close(); + //This code used to call close() however that was problematic + //because the scope of the fd is a transaction, thus if commit + //or rollback was called before garbage collection ran then + //the call to close would error out with an invalid large object + //handle. So this method now does nothing and lets the server + //handle cleanup when it ends the transaction. } /* |