#2095·pgx

Tracelog truncation can make output longer.

Author: ecordellCreated Jul 23, 2024Updated Jun 22, 2026

This is a pretty small nitpick, but I noticed:

https://github.com/jackc/pgx/blob/ea9610f6722e0c6c6073660f14ded3c9683a593e/tracelog/tracelog.go#L101

The message indicating truncation can take up more space than the number of bytes being removed - i.e. if you commonly have values of 65 bytes, it will truncate 1 byte but print out an extra (truncated 1 bytes), which is 20 more bytes. Maybe changing this can be rolled into a solution for https://github.com/jackc/pgx/issues/998