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

Поиск
Список
Период
Сортировка
От Noel Grandin
Тема Re: how does postgresql handle LOB/CLOB/BLOB column data that dies before the query ends
Дата
Msg-id CAFYHVnWvOBtQNHh23pXnc5W1pnq17E09oyESOsNLnuxA9NSjqw@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>)
Ответы 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
Thanks for the answers.

So, H2, like PostgreSQL, also internally has (a) an MVCC engine and (b) LOBs existing as a on-the-side extra thing.

On Fri, 24 Feb 2023 at 17:39, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Postgres doesn't really do LOB in the same sense that some other DBs
have, so you'd need to specify what you have in mind in Postgres
terms to get a useful answer.

So, specifically, the primary problem we have is this:

(1) A typical small query returns all of its data in a stream to the client
(2) which means that, from the server's perspective, the transaction is closed the moment the last record in the stream is pushed to the client.
(3) which means that, in the face of concurrent updates, the underlying MVCC data in the query might be long-gone from the server by the time the client has finished reading the result set.
(4) However, with LOBs, the client doesn't get the LOB in the result set data stream, it gets a special identifier (a hash), which it uses to fetch LOB data from the server in chunks
(5) Which means that the lifetime of an individual LOB is just horrible
At the moment the implementation I have satisfies the needs of clients in terms of correctness (crosses fingers), but is horrible in terms of performance because of how long it has to keep LOB data around.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Doc update for pg_stat_statements normalization
Следующее
От: John Naylor
Дата:
Сообщение: Re: Reducing System Allocator Thrashing of ExecutorState to Alleviate FDW-related Performance Degradations