From 2d13dab048a7e0777875529620f81d32ce57dfd8 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Tue, 22 Aug 2023 11:57:08 -0400 Subject: 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 --- src/tools/pgindent/typedefs.list | 1 + 1 file changed, 1 insertion(+) (limited to 'src/tools/pgindent') diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list index c463596ea7b..e11a650b1c3 100644 --- a/src/tools/pgindent/typedefs.list +++ b/src/tools/pgindent/typedefs.list @@ -2910,6 +2910,7 @@ mblen_converter mbverifier md5_ctxt metastring +missing_cache_key mix_data_t mixedStruct mode_t -- cgit v1.2.3