how does postgresql handle LOB/CLOB/BLOB column data that dies before the query ends

Поиск
Список
Период
Сортировка
От Noel Grandin
Тема how does postgresql handle LOB/CLOB/BLOB column data that dies before the query ends
Дата
Msg-id CAFYHVnXRLrkohn8TYrkLqUkpEc9kj8ELUNqK+9Zdakt31AYZJw@mail.gmail.com
обсуждение исходный текст
Ответы Re: how does postgresql handle LOB/CLOB/BLOB column data that dies before the query ends  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: buildfarm + meson
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pgindent vs. git whitespace check