pg.ddx.io  GitHub: pgjdbc/pgjdbc (issues + PRs as email threads)  
help / color / mirror / Atom feed
From: vlsi (@vlsi) <noreply+vlsi@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #4332: fix: limit FINEST Bind, Parse and SimpleQuery log messages to maxLogMessageLength to avoid OOM
Date: Wed, 14 Oct 2026 02:52:58 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4332-rc4266276843@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4332@github.com>
References: <gh-pgjdbc-pgjdbc-4332@github.com>

(on pgjdbc/src/main/java/org/postgresql/core/v3/BindLog.java:79)

When the room left is no larger than `,$i=<` (here), or is used up exactly (line 44), the loop stops and the message gets no `...(truncated)` marker, so a reader cannot tell that parameters are missing. If one character of room is left, line 83 closes the message with `)`, and it looks complete: in `manyBindsAreCapped` the trace is 512 characters ending `,$5=<...(~88 chars)>,type=VARCHAR)`, and `$6` to `$500` are gone. With `maxLogMessageLength=59` and 30 `int4` parameters the trace is ` FE=> Bind(stmt=null,portal=null,$1=<('1'::int4)>,type=INT4`. Please mark the message as truncated whenever a parameter is left out.

view thread (58+ messages)  latest in thread

Message-ID: <gh-pgjdbc-pgjdbc-4332-rc4266276843@github.com>
Permalink:  ../gh-pgjdbc-pgjdbc-4332-rc4266276843@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox