pg.ddx.io  GitHub: pgjdbc/pgjdbc (issues + PRs as email threads)  
help / color / mirror / Atom feed
From: sankalpsthakur (@sankalpsthakur) <noreply+sankalpsthakur@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: Sat, 01 Aug 2026 11:54:55 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4332-c5151308441@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4332@github.com>
References: <gh-pgjdbc-pgjdbc-4332@github.com>

Thanks for the thorough review @davecramer — addressed in 5ce8aaf:

**Medium (unknown-type materialization)**  
- `estimateLogSize` now returns fixed sizes for unset (`"?"` → 1) and SQL-null (`"(NULL)"` → 6); `-1` is only for truly unknown value types.  
- When the estimate is `< 0` or exceeds the remaining budget, `BindLog` uses a placeholder (`...(unestimated)` / `...(~N chars)`) and never calls `toString` on the value.  
- Covered by a unit test that injects an unrecognized huge object via reflection.

**Minors**  
- Placeholder unit: `bytes` → `~N chars`.  
- Dangling `,$i=<`: budget is checked **before** appending the parameter prefix.  
- `-1` Javadoc clarified (unknown size only; nulls are sized).

Focused tests: `BindLogTest`, `LogMessageUtilsTest`, `PGPropertyTest` — all green.

view thread (58+ messages)  latest in thread

Message-ID: <gh-pgjdbc-pgjdbc-4332-c5151308441@github.com>
Permalink:  ../gh-pgjdbc-pgjdbc-4332-c5151308441@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