Re: increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS
Date: 2025-12-03 14:31:08
Message-ID: a248a94a-10a1-4b67-ac37-2b481c4c76e2@vondra.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/2/25 17:05, Tomas Vondra wrote:
> ...
>
> So it was ~19h for a while (started at ~14h about 4y back). And then
> between September 14 and 22 it jumped to ~32h. Which seems like a lot.
>
> And that seems to be due to stats_ext changing from
>
> ok 157 + stats_ext 855865 ms
>
> to
>
> ok 157 + stats_ext 15158426 ms
>
> That's ~14300 seconds, i.e. ~4h. Pretty close to the timeout limit. The
> machine is running the test with two locales, so there are multiple runs
> of this regression test.
>

After bisecting this, it seems to have changed in this commit:

commit 1eccb93150707acfcc8f24556a15742a6313c8ac (HEAD -> stats-ext)
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Date: Sat Sep 20 12:44:52 2025 -0400

Re-allow using statistics for bool-valued functions in WHERE.

Commit a391ff3c3, which added the ability for a function's support
function to provide a custom selectivity estimate for "WHERE ...

And it seems to be "stuck" on the last few queries doing this:

SELECT * FROM check_estimated_rows('SELECT * FROM sb_2 WHERE
extstat_small(y)');

Attached is a perf-report for this, but the interesting part is:

--99.51%--plpgsql_exec_function
exec_toplevel_block.constprop.0
exec_stmt_block
exec_stmts
exec_stmt_return (inlined)
exec_eval_expr
exec_eval_simple_expr (inlined)
|
--99.37%--SPI_plan_get_cached_plan
GetCachedPlan
|
|--96.58%--RevalidateCachedQuery
| |
| |--96.00%--pg_analyze_and_rewrite_withcb
| | parse_analyze_withcb
| | |
| | --96.00%--transformTopLevelStmt (inlined)

I'm not sure if this a problem in the code, or whether it's just that
the test case happens to be this expensive with cache clobbering. Maybe
I simply need to increase the timeout for this machine, so that it does
not fail after 4h? It'd be unfortunate, as the runs are already long,
and this pushes them over 24h ... :-(

regards

--
Tomas Vondra

Attachment Content-Type Size
report.txt.gz application/gzip 9.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-12-03 14:36:05 Re: Cleanup shadows variable warnings, round 1
Previous Message Álvaro Herrera 2025-12-03 14:27:20 Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY