how does postgresql handle LOB/CLOB/BLOB column data that dies before the query ends - Mailing list pgsql-hackers

From Noel Grandin
Subject how does postgresql handle LOB/CLOB/BLOB column data that dies before the query ends
Date
Msg-id CAFYHVnXRLrkohn8TYrkLqUkpEc9kj8ELUNqK+9Zdakt31AYZJw@mail.gmail.com
Whole thread Raw
Responses Re: how does postgresql handle LOB/CLOB/BLOB column data that dies before the query ends
List pgsql-hackers
Hi

Hacker from another open-source DB here (h2database.com).

How does postgresql handle the following situation?

(1) a table containing a LOB column 
(2) a query that does
   ResultSet rs = query("select lob_column from table_foo");
  while (rs.next())
  {
      retrieve_lob_data(rs.getLob(1));
      .... very long running stuff here......
   }

In the face of concurrent updates that might overwrite the existing LOB data, how does PostgresQL handle this?

Does it keep the LOB data around until the ResultSet/Connection is closed?
Or does it impose some extra constraint on the client side? e.g.. explicitly opening and closing a transaction, and only wipe the "old" LOB data when the transaction is closed?

I ask because I have implemented two of the four LOB implementations that H2 has used, and we are still having trouble :-(

Regards, Noel.

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: buildfarm + meson
Next
From: Peter Eisentraut
Date:
Subject: Re: pgindent vs. git whitespace check