From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: libpq: Fix lots of discrepancies in PQtrace |
Date: | 2024-08-09 23:08:40 |
Message-ID: | 202408092308.nua7goczvgi5@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Regarding 0004:
I don't want to add 4 bytes to struct pg_conn for tracing support. I'm
tempted to make the new struct member a plain 'char' to reduce overhead
for a feature that almost nobody is going to use. According to pahole
we have a 3 bytes hole in that position of the struct, so if we make it
a 1- or 2-byte member, there's no storage overhead whatsoever.
Also, why not have pqTraceOutputMessage() responsible for resetting the
byte after printing the message? It seems to cause less undesirable
detritus.
I propose something like the attached, but it's as yet untested. What
do you think?
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"El sentido de las cosas no viene de las cosas, sino de
las inteligencias que las aplican a sus problemas diarios
en busca del progreso." (Ernesto Hernández-Novich)
Attachment | Content-Type | Size |
---|---|---|
0001-libpq-Trace-frontend-authentication-challenges.patch | text/x-diff | 6.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Sami Imseih | 2024-08-10 00:01:55 | Re: Restart pg_usleep when interrupted |
Previous Message | Paul Jungwirth | 2024-08-09 23:04:45 | format_datum debugging function |