On Wed, May 12, 2021 at 08:58:45AM +0200, Pavel Stehule wrote:
>
> I don't like the idea of implicit force enabling any feature flag, but it
> is better than current design. But it doesn't look like a robust solution.
>
> Does it mean that if somebody disables computed_query_id, then
> pg_stat_statements will not work?
It depends, but if you mean "setting up pg_stat_statements, intentionally
disabling in-core queryid calculation and not configuring an alternative
source" then yes pg_stat_statements will not work. But I don't see any
difference from "someone reduce wal_level and complain that replication does
not work" or "someone disable fsync and complain that data got corrupted". We
provide a sensible default configuration, you can mess it up if you don't know
what you're doing.
> Why is there the strong dependency between computed_query_id and
> pg_stat_statements? Can this dependency be just optional?
Once again no, as it otherwise would mean that postgres unilaterally decides
that pg_stat_statements' approach to compute a query identifier is the one and
only ultimate truth and nothing else could be useful for anyone.