Re: BackendKeyData is mandatory?
Jelte Fennema-Nio <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
Jacob Champion <jacob.champion@enterprisedb.com>, Tatsuo Ishii <ishii@postgresql.org>, peter@eisentraut.org,
pgsql-hackers@postgresql.org, Dave Cramer <davecramer@gmail.com>
Date: 2025-08-19T20:49:06Z
Lists: pgsql-hackers
On Thu, 14 Aug 2025 at 15:10, Heikki Linnakangas <hlinnaka@iki.fi> wrote: > Here's a new set of patches, to disconnect on OOM instead of hanging or > silently discarding messages: Code looks good. Som small nitpicks though. This change seems unnecessary, i.e. free(NULL) is a no-op - free(svname); + if (svname) + free(svname); Small wording suggestion, maybe change this: The caller has already saved the error message in conn->errorMessage. to The caller should have already saved the error message in conn->errorMessage. or even The caller should have already saved the error message using libpq_append_conn_error.
Commits
-
Revert unnecessary check for NULL
- 5a26a3e4eeb2 18.0 landed
- 807ee417e562 19 (unreleased) landed
-
libpq: Be strict about cancel key lengths
- e7ff96853ea7 18.0 landed
- e411a8d25a4b 19 (unreleased) landed
-
libpq: Handle OOM by disconnecting instead of hanging or skipping msgs
- 8aa287c9061b 18.0 landed
- f6f0542266f0 19 (unreleased) landed
-
libpq: Complain about missing BackendKeyData later with PGgetCancel()
- 42b1480eb2c6 18.0 landed
- a4801eb691ed 19 (unreleased) landed