Re: compute_query_id and pg_stat_statements - Mailing list pgsql-hackers

From Andres Freund
Subject Re: compute_query_id and pg_stat_statements
Date
Msg-id 20210426183745.4gd2s5qra6mlxfto@alap3.anarazel.de
Whole thread Raw
In response to Re: compute_query_id and pg_stat_statements  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: compute_query_id and pg_stat_statements
List pgsql-hackers
Hi,

On 2021-04-26 14:21:00 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> That's sounding like a pretty sane design, actually.  Not sure about
> the shared-library-name-with-fixed-function-name detail, but certainly
> it seems to be useful to separate "I need a query-id" from the details
> of the ID calculation.
> 
> Rather than a GUC per se for the ID provider, maybe we could have a
> function hook that defaults to pointing at the in-core computation,
> and then a module wanting to override that just gets into the hook.

I have a preference to determining the provider via GUC instead of a
hook because it is both easier to introspect and easier to configure.

If the provider is loaded via a hook, and the shared library is loaded
via shared_preload_libraries, one can't easily just turn that off in a
single session, but needs to restart or explicitly load a different
library (that can't already be loaded).

We also don't have any way to show what's hooking into a hook.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: compute_query_id and pg_stat_statements
Next
From: Magnus Hagander
Date:
Subject: Re: compute_query_id and pg_stat_statements