Re: Shared detoast Datum proposal - Mailing list pgsql-hackers

From Nikita Malakhov
Subject Re: Shared detoast Datum proposal
Date
Msg-id CAN-LCVOSiWpZrG8F0zDFzE+q=Lp0GM=u5cL2hez=8czPD6Pk9w@mail.gmail.com
Whole thread Raw
In response to Re: Shared detoast Datum proposal  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Responses Re: Shared detoast Datum proposal
List pgsql-hackers
Hi!

Here's a slightly improved version of patch Tomas provided above (v2),
with cache invalidations and slices caching added, still as PoC.

The main issue I've encountered during tests is that when the same query
retrieves both slices and full value - slices, like substring(t,...) the order of
the values is not predictable, with text fields substrings are retrieved
before the full value and we cannot benefit from cache full value first
and use slices from cached value.

Yet the cache code is still very compact and affects only sources related
to detoasting.

Tomas, about  HASH_ENTER - according to comments it could throw
an OOM error, so I've changed it to  HASH_ENTER_NULL to avoid
new errors. In this case we would just have the value not cached
without an error.

--
Regards,
Nikita Malakhov
Postgres Professional
The Russian Postgres Company
Attachment

pgsql-hackers by date:

Previous
From: Alexander Cheshev
Date:
Subject: [PATCH] TODO “Allow LISTEN on patterns”
Next
From: Sutou Kouhei
Date:
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations