| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Pavlo Golub <pavlo(dot)golub(at)cybertec(dot)at> |
| Cc: | Sami Imseih <samimseih(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH v5] pg_stat_statements: Add last_execution_start column |
| Date: | 2026-06-10 18:03:37 |
| Message-ID: | sznxsch5fqidpp6636eugbpk4ady5kmffhyrvb2yy6ve6cgw47@p6z5z6cdjtte |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On 2026-06-10 17:36:24 +0000, Pavlo Golub wrote:
> @@ -1490,6 +1509,10 @@ pgss_store(const char *query, int64 queryId,
> else if (planOrigin == PLAN_STMT_CACHE_CUSTOM)
> entry->counters.custom_plan_calls++;
>
> + /* Record the start time of this execution, if provided */
> + if (exec_start != 0)
> + entry->last_execution_start = exec_start;
> +
> SpinLockRelease(&entry->mutex);
> }
FWIW, I remain opposed to adding *any* additional thing under the spinlock. We
first need to fix the design of pgss, then we can start discussing expanding
it even further.
I've seen way too many instances being brought to their knee because of pgss
contention. We shouldn't make it even worse.
Greetings,
Andres Freund
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Cary Huang | 2026-06-10 18:50:44 | Re: [PATCH] psql: add \dcs to list all constraints |
| Previous Message | Sehrope Sarkuni | 2026-06-10 17:45:55 | Assorted Win32 error handling fixes (CreateThread, pgwin32_select, pg_usleep) |