protocol support for labels - Mailing list pgsql-hackers

From Jeremy Schneider
Subject protocol support for labels
Date
Msg-id 20250310230900.01b58a29@ardentperf.com
Whole thread Raw
Responses Re: protocol support for labels
List pgsql-hackers
pgconf.dev is coming up soon. I won't be able to make it to Montreal,
but I saw that Dave Cramer posted on twitter asking about postgres
protocol topics.

while I don't have a patch, I wanted to send an email about something:
it'd be great to have a place - perhaps like application_name - for
arbitrary labels; and we need protocol support to pass those labels
inline with the query instead of having to require a separate round
trip. it would also be good if these labels were somehow accessible in
logging formats.

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.

if protocol enhancements are on the table, I think it would be great
for this topic to get a little discussion.

-Jeremy



pgsql-hackers by date:

Previous
From: Junwang Zhao
Date:
Subject: Re: SQL Property Graph Queries (SQL/PGQ)
Next
From: Bertrand Drouvot
Date:
Subject: Re: [BUG]: the walsender does not update its IO statistics until it exits