pgsql: Cache by-reference missing values in a long lived context

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема pgsql: Cache by-reference missing values in a long lived context
Дата
Msg-id E1qYvJA-000XT3-QX@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Cache by-reference missing values in a long lived context  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
Cache by-reference missing values in a long lived context

Attribute missing values might be needed past the lifetime of the tuple
descriptors from which they are extracted. To avoid possibly using
pointers for by-reference values which might thus be left dangling, we
cache a datumCopy'd version of the datum in the TopMemoryContext. Since
we first search for the value this only needs to be done once per
session for any such value.

Original complaint from Tom Lane, idea for mitigation by Andrew Dunstan,
tweaked by Tom Lane.

Backpatch to version 11 where missing values were introduced.

Discussion: https://postgr.es/m/1306569.1687978174@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2d13dab048a7e0777875529620f81d32ce57dfd8

Modified Files
--------------
src/backend/access/common/heaptuple.c | 91 ++++++++++++++++++++++++++++++++++-
src/tools/pgindent/typedefs.list      |  1 +
2 files changed, 91 insertions(+), 1 deletion(-)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: ci: Move execution method of tasks into yaml templates
Следующее
От: Nathan Bossart
Дата:
Сообщение: pgsql: Bump catversion for to_bin() and to_oct().