| From: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
| 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-10 14:27:02 |
| Message-ID: | CAGECzQRKV2_3kXa4gdom=NqE6B7R43Njxc4D6GLSiU7Rhz6HMA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, 10 Aug 2024 at 01:08, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> 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.
Sounds fine to me.
> Also, why not have pqTraceOutputMessage() responsible for resetting the
> byte after printing the message? It seems to cause less undesirable
> detritus.
Yeah, that's indeed much nicer.
> I propose something like the attached, but it's as yet untested. What
> do you think?
Looks good, but I haven't tested it yet either.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stepan Neretin | 2024-08-10 14:45:01 | Re: SPI_connect, SPI_connect_ext return type |
| Previous Message | Nathan Bossart | 2024-08-10 14:26:38 | Re: is_superuser versus set_config_option's parallelism check |