libpq: Fix lots of discrepancies in PQtrace - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject libpq: Fix lots of discrepancies in PQtrace
Date
Msg-id CAGECzQSoPHtZ4xe0raJ6FYSEiPPS+YWXBhOGo+Y1YecLgknF3g@mail.gmail.com
Whole thread Raw
Responses Re: libpq: Fix lots of discrepancies in PQtrace
List pgsql-hackers
After initially trying to add trace support for
StartupMessage/SSLRequest/GSSENCRequest[1] I realized there were many
more cases where PQtrace was not correctly tracing messages, or not
even tracing them at all. These patches fix all of the issues that I
was able to find.

0001 is some cleanup after f4b54e1ed9
0002 does some preparatory changes for 0004 & 0007

All the others improve the tracing, and apart from 0004 and 0007
depending on 0002, none of these patches depend on each other.
Although you could argue that 0007 and 0008 depend on 0006, because
without 0006 the code added by 0007 and 0008 won't ever really be
executed.

To test you can add a PQreset(conn) call to the start of the
test_cancel function in:
src/test/modules/libpq_pipeline/libpq_pipeline.c.

And then run:
ninja -C build all install-quiet &&
build/src/test/modules/libpq_pipeline/libpq_pipeline cancel
'port=5432' -t test.trace

And then look at the top of test.trace

[1]: https://www.postgresql.org/message-id/CAGECzQTTN5aGqtDaRifJXPyd_O5qHWQcOxsHJsDSVNqMugGNEA%40mail.gmail.com

Attachment

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions
Next
From: Michail Nikolaev
Date:
Subject: Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY