public inbox for [email protected]  
help / color / mirror / Atom feed
pgsql: libpq: Make error checks in the new buffer draining code more ro
7+ messages / 1 participants
[nested] [flat]

* pgsql: libpq: Make error checks in the new buffer draining code more ro
@ 2026-07-09 15:51  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-07-09 15:51 UTC (permalink / raw)
  To: [email protected]

libpq: Make error checks in the new buffer draining code more robust

Check explicitly for pqsecure_read() returning an error. It shouldn't
fail, and we would've caught it in the check for a short read, but
better to be explicit so that the error message is more informative.
We also shouldn't update 'inEnd' when the read fails, although that
too is just pro forma as we will bail out and close the connection on
error.

Reported-by: Peter Eisentraut <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/17accbe0f4e8a9afd563a8e255fead45e5145de5

Modified Files
--------------
src/interfaces/libpq/fe-misc.c   | 11 ++++++++---
src/interfaces/libpq/fe-secure.c |  5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: libpq: Make error checks in the new buffer draining code more ro
@ 2026-07-09 15:51  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-07-09 15:51 UTC (permalink / raw)
  To: [email protected]

libpq: Make error checks in the new buffer draining code more robust

Check explicitly for pqsecure_read() returning an error. It shouldn't
fail, and we would've caught it in the check for a short read, but
better to be explicit so that the error message is more informative.
We also shouldn't update 'inEnd' when the read fails, although that
too is just pro forma as we will bail out and close the connection on
error.

Reported-by: Peter Eisentraut <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d9eb70c9c692475174289d9bdc5c76734abbfa0c

Modified Files
--------------
src/interfaces/libpq/fe-misc.c   | 11 ++++++++---
src/interfaces/libpq/fe-secure.c |  5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: libpq: Make error checks in the new buffer draining code more ro
@ 2026-07-09 15:51  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-07-09 15:51 UTC (permalink / raw)
  To: [email protected]

libpq: Make error checks in the new buffer draining code more robust

Check explicitly for pqsecure_read() returning an error. It shouldn't
fail, and we would've caught it in the check for a short read, but
better to be explicit so that the error message is more informative.
We also shouldn't update 'inEnd' when the read fails, although that
too is just pro forma as we will bail out and close the connection on
error.

Reported-by: Peter Eisentraut <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7532f2117c4e422ca08896473689f589309219c3

Modified Files
--------------
src/interfaces/libpq/fe-misc.c   | 11 ++++++++---
src/interfaces/libpq/fe-secure.c |  5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: libpq: Make error checks in the new buffer draining code more ro
@ 2026-07-09 15:51  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-07-09 15:51 UTC (permalink / raw)
  To: [email protected]

libpq: Make error checks in the new buffer draining code more robust

Check explicitly for pqsecure_read() returning an error. It shouldn't
fail, and we would've caught it in the check for a short read, but
better to be explicit so that the error message is more informative.
We also shouldn't update 'inEnd' when the read fails, although that
too is just pro forma as we will bail out and close the connection on
error.

Reported-by: Peter Eisentraut <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/87c3a79ea206410f34f326eb63c36d8679edeb8b

Modified Files
--------------
src/interfaces/libpq/fe-misc.c   | 11 ++++++++---
src/interfaces/libpq/fe-secure.c |  5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: libpq: Make error checks in the new buffer draining code more ro
@ 2026-07-09 15:51  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-07-09 15:51 UTC (permalink / raw)
  To: [email protected]

libpq: Make error checks in the new buffer draining code more robust

Check explicitly for pqsecure_read() returning an error. It shouldn't
fail, and we would've caught it in the check for a short read, but
better to be explicit so that the error message is more informative.
We also shouldn't update 'inEnd' when the read fails, although that
too is just pro forma as we will bail out and close the connection on
error.

Reported-by: Peter Eisentraut <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bab0a2db733502da5663c5aef38976cbf8711707

Modified Files
--------------
src/interfaces/libpq/fe-misc.c   | 11 ++++++++---
src/interfaces/libpq/fe-secure.c |  5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: libpq: Make error checks in the new buffer draining code more ro
@ 2026-07-09 15:51  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-07-09 15:51 UTC (permalink / raw)
  To: [email protected]

libpq: Make error checks in the new buffer draining code more robust

Check explicitly for pqsecure_read() returning an error. It shouldn't
fail, and we would've caught it in the check for a short read, but
better to be explicit so that the error message is more informative.
We also shouldn't update 'inEnd' when the read fails, although that
too is just pro forma as we will bail out and close the connection on
error.

Reported-by: Peter Eisentraut <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/56988064bcaf91c9526e2b42b19228fc48fff539

Modified Files
--------------
src/interfaces/libpq/fe-misc.c   | 11 ++++++++---
src/interfaces/libpq/fe-secure.c |  5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: libpq: Make error checks in the new buffer draining code more ro
@ 2026-07-09 15:51  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Heikki Linnakangas @ 2026-07-09 15:51 UTC (permalink / raw)
  To: [email protected]

libpq: Make error checks in the new buffer draining code more robust

Check explicitly for pqsecure_read() returning an error. It shouldn't
fail, and we would've caught it in the check for a short read, but
better to be explicit so that the error message is more informative.
We also shouldn't update 'inEnd' when the read fails, although that
too is just pro forma as we will bail out and close the connection on
error.

Reported-by: Peter Eisentraut <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]
Backpatch-through: 14

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5ba13f8c0488feefac4115e4efd22b522c983b21

Modified Files
--------------
src/interfaces/libpq/fe-misc.c   | 11 ++++++++---
src/interfaces/libpq/fe-secure.c |  5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2026-07-09 15:51 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-09 15:51 pgsql: libpq: Make error checks in the new buffer draining code more ro Heikki Linnakangas <[email protected]>
2026-07-09 15:51 pgsql: libpq: Make error checks in the new buffer draining code more ro Heikki Linnakangas <[email protected]>
2026-07-09 15:51 pgsql: libpq: Make error checks in the new buffer draining code more ro Heikki Linnakangas <[email protected]>
2026-07-09 15:51 pgsql: libpq: Make error checks in the new buffer draining code more ro Heikki Linnakangas <[email protected]>
2026-07-09 15:51 pgsql: libpq: Make error checks in the new buffer draining code more ro Heikki Linnakangas <[email protected]>
2026-07-09 15:51 pgsql: libpq: Make error checks in the new buffer draining code more ro Heikki Linnakangas <[email protected]>
2026-07-09 15:51 pgsql: libpq: Make error checks in the new buffer draining code more ro Heikki Linnakangas <[email protected]>

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