Re: protocol support for labels - Mailing list pgsql-hackers

From Kirill Reshke
Subject Re: protocol support for labels
Date
Msg-id CALdSSPiA4nDBmPg5s38YnfWMX79hyhjEB=Hgyf7cmE8fQRDoSw@mail.gmail.com
Whole thread Raw
In response to protocol support for labels  (Jeremy Schneider <schneider@ardentperf.com>)
Responses Re: protocol support for labels
List pgsql-hackers
On Tue, 11 Mar 2025 at 11:09, Jeremy Schneider <schneider@ardentperf.com> wrote:

> observability frameworks like OpenTelemetry support tracing through all
> layers of a stack, and trace_ids can even be passed into sql with
> extensions like sqlcommenter. however sqlcommenter puts the trace_id
> into a comment which effectively breaks all the utility of
> pg_stat_statements since each query has a unique trace_id.
>
There are some other use-cases:
1) RO-RW routing. Users can pass target-session-attrs to the server
within query labels to hint about its need. Useful when some kind of
proxy (odyssey,pgbouncer,spqr,pgpool II, pgcat, pg_doorman) is used.
2) pg_comment_stats uses comments in the query to accumulate statistics. [0]

However, I don't think PostgreSQL community is open for this big
change for much (non-big) matters.

[0] git@github.com:munakoiso/pg_comment_stats.git

-- 
Best regards,
Kirill Reshke



pgsql-hackers by date:

Previous
From: Ilia Evdokimov
Date:
Subject: Re: explain analyze rows=%.0f
Next
From: Rushabh Lathia
Date:
Subject: Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints