Re: pg_stat_statements: Add `calls_aborted` counter for tracking query cancellations - Mailing list pgsql-hackers

From Benoit T
Subject Re: pg_stat_statements: Add `calls_aborted` counter for tracking query cancellations
Date
Msg-id 91EB8C15-5A15-4B07-A7CE-6133FB9948AC@gmail.com
Whole thread Raw
In response to Re: pg_stat_statements: Add `calls_aborted` counter for tracking query cancellations  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers

> On 19 Aug 2025, at 15:46, Andres Freund <andres@anarazel.de> wrote:
>
> I think it's pretty insane to do things like variance computation while
> holding a spinlock, for every friggin query execution. The spinlock'ed section
> is ~185 instructions for me, with plenty high-latency instructions like
> divisions.
>
> It's so slow that it has measurable impact for single threaded readonly
> pgbench. Which does friggin btree lookups.

Do you think it could be an option to first add regression benchmarks,
and then consider migrating the most time-consuming columns
to another extension?

Not sure moving results out of pgss could be an option.

---
Benoit


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt
Next
From: Tom Lane
Date:
Subject: Re: Identifying function-lookup failures due to argument name mismatches