pgsql: Improve stability of tests for VACUUM (SKIP_LOCKED)

2019-11-15 Thread Michael Paquier
Improve stability of tests for VACUUM (SKIP_LOCKED) Concurrent autovacuums running with the main regression test suite could cause the tests with VACUUM (SKIP_LOCKED) to generate randomly WARNING messages. For these tests, set client_min_messages to ERROR to get rid of those random failures, as d

pgsql: Improve stability of tests for VACUUM (SKIP_LOCKED)

2019-11-15 Thread Michael Paquier
Improve stability of tests for VACUUM (SKIP_LOCKED) Concurrent autovacuums running with the main regression test suite could cause the tests with VACUUM (SKIP_LOCKED) to generate randomly WARNING messages. For these tests, set client_min_messages to ERROR to get rid of those random failures, as d

pgsql: Properly determine length for on-disk TOAST values

2019-11-15 Thread Tomas Vondra
Properly determine length for on-disk TOAST values In detoast_attr_slice, VARSIZE_ANY was used to compute compressed length of on-disk TOAST values. That's incorrect, because the varlena value may be just a TOAST pointer, producing either bogus value or crashing. This is likely why the code was c

pgsql: Skip system attributes when applying mvdistinct stats

2019-11-15 Thread Tomas Vondra
Skip system attributes when applying mvdistinct stats When estimating number of distinct groups, we failed to ignore system attributes when matching the group expressions to mvdistinct stats, causing failures like ERROR: negative bitmapset member not allowed Fix that by simply skipping anythin

pgsql: Skip system attributes when applying mvdistinct stats

2019-11-15 Thread Tomas Vondra
Skip system attributes when applying mvdistinct stats When estimating number of distinct groups, we failed to ignore system attributes when matching the group expressions to mvdistinct stats, causing failures like ERROR: negative bitmapset member not allowed Fix that by simply skipping anythin

pgsql: Skip system attributes when applying mvdistinct stats

2019-11-15 Thread Tomas Vondra
Skip system attributes when applying mvdistinct stats When estimating number of distinct groups, we failed to ignore system attributes when matching the group expressions to mvdistinct stats, causing failures like ERROR: negative bitmapset member not allowed Fix that by simply skipping anythin

pgsql: Skip system attributes when applying mvdistinct stats

2019-11-15 Thread Tomas Vondra
Skip system attributes when applying mvdistinct stats When estimating number of distinct groups, we failed to ignore system attributes when matching the group expressions to mvdistinct stats, causing failures like ERROR: negative bitmapset member not allowed Fix that by simply skipping anythin

pgsql: Always call ExecShutdownNode() if appropriate.

2019-11-15 Thread Thomas Munro
Always call ExecShutdownNode() if appropriate. Call ExecShutdownNode() after ExecutePlan()'s loop, rather than at each break. We had forgotten to do that in one case. The omission caused intermittent "temporary file leak" warnings from multi-batch parallel hash joins with a LIMIT clause. Back-p

pgsql: Always call ExecShutdownNode() if appropriate.

2019-11-15 Thread Thomas Munro
Always call ExecShutdownNode() if appropriate. Call ExecShutdownNode() after ExecutePlan()'s loop, rather than at each break. We had forgotten to do that in one case. The omission caused intermittent "temporary file leak" warnings from multi-batch parallel hash joins with a LIMIT clause. Back-p

pgsql: Always call ExecShutdownNode() if appropriate.

2019-11-15 Thread Thomas Munro
Always call ExecShutdownNode() if appropriate. Call ExecShutdownNode() after ExecutePlan()'s loop, rather than at each break. We had forgotten to do that in one case. The omission caused intermittent "temporary file leak" warnings from multi-batch parallel hash joins with a LIMIT clause. Back-p

pgsql: Doc: in v12 release notes, explain how to replace uses of consrc

2019-11-15 Thread Tom Lane
Doc: in v12 release notes, explain how to replace uses of consrc and adsrc. While you can find that info if you drill down far enough, it seems more helpful to put something right in the compatibility notes. Per a question from Ivan Sergio Borgonovo. Discussion: https://postgr.es/m/a6359855-2a5