postgresql/src/backend
Tomas Vondra abb2f9144b Release memory allocated by dependency_degree
Calculating degree of a functional dependency may allocate a lot of
memory - we have released mot of the explicitly allocated memory, but
e.g. detoasted varlena values were left behind. That may be an issue,
because we consider a lot of dependencies (all combinations), and the
detoasting may happen for each one again.

Fixed by calling dependency_degree() in a dedicated context, and
resetting it after each call. We only need the calculated dependency
degree, so we don't need to copy anything.

Backpatch to PostgreSQL 10, where extended statistics were introduced.

Backpatch-through: 10
Discussion: https://www.postgresql.org/message-id/20210915200928.GP831%40telsasoft.com
2021-09-23 18:25:37 +02:00
..
access Fix "single value strategy" index deletion issue. 2021-09-21 18:57:31 -07:00
bootstrap Rethink definition of pg_attribute.attcompression. 2021-05-27 13:24:27 -04:00
catalog Invalidate all partitions for a partitioned table in publication. 2021-09-22 08:13:37 +05:30
commands Invalidate all partitions for a partitioned table in publication. 2021-09-22 08:13:37 +05:30
executor Fix missing words in comment. 2021-09-07 10:30:04 +03:00
foreign Update copyright for 2021 2021-01-02 13:06:25 -05:00
jit jit: Do not try to shut down LLVM state in case of LLVM triggered errors. 2021-09-13 18:15:28 -07:00
lib Fix typo in comment 2021-04-20 14:35:16 +02:00
libpq Message style improvements 2021-09-16 15:36:58 +02:00
main Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodes Change the name of the Result Cache node to Memoize 2021-07-14 12:45:00 +12:00
optimizer Fix pull_varnos to cope with translated PlaceHolderVars. 2021-09-17 15:41:16 -04:00
parser Disable anonymous record hash support except in special cases 2021-09-08 09:55:18 +02:00
partitioning Avoid using ambiguous word "non-negative" in error messages. 2021-07-28 01:21:35 +09:00
po Translation updates 2021-09-20 16:23:13 +02:00
port Make EXEC_BACKEND more convenient on macOS. 2021-08-13 11:11:59 +12:00
postmaster Fix performance regression from session statistics. 2021-09-16 02:10:57 -07:00
regex Make pg_regexec() robust against out-of-range search_start. 2021-09-11 15:19:43 -04:00
replication Fix reorder buffer memory accounting for toast changes. 2021-09-13 10:35:00 +05:30
rewrite Fix rewriter to set hasModifyingCTE correctly on rewritten queries. 2021-09-08 12:05:43 -04:00
snowball Update snowball 2021-02-19 08:10:15 +01:00
statistics Release memory allocated by dependency_degree 2021-09-23 18:25:37 +02:00
storage Fix variable shadowing in procarray.c. 2021-09-16 13:07:10 +09:00
tcop Fix performance regression from session statistics. 2021-09-16 02:10:57 -07:00
tsearch Fix typos and grammar in comments and docs 2021-04-19 11:32:30 +09:00
utils Fix EXPLAIN to handle SEARCH BREADTH FIRST queries. 2021-09-16 10:45:42 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
nls.mk Translation updates 2021-09-20 16:23:13 +02:00