pgsql: Fix integer overflow in debug message of walreceiver - Mailing list pgsql-committers

From Tatsuo Ishii
Subject pgsql: Fix integer overflow in debug message of walreceiver
Date
Msg-id E1YWYwy-0001Hh-HP@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix integer overflow in debug message of walreceiver

The message tries to tell the replication apply delay which fails if
the first WAL record is not applied yet. Fix is, instead of telling
overflowed minus numeric, showing "N/A" which indicates that the delay
data is not yet available. Problem reported by me and patch by
Fabrízio de Royes Mello.

Back patched to 9.4, 9.3 and 9.2 stable branches (9.1 and 9.0 do not
have the debug message).

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/089b371a3977bd3a7b71a79966e8ea86296ecda3

Modified Files
--------------
src/backend/replication/walreceiver.c      |   21 ++++++++++++++++-----
src/backend/replication/walreceiverfuncs.c |   12 ++++++++++--
2 files changed, 26 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: pgsql: Fix integer overflow in debug message of walreceiver
Next
From: Tatsuo Ishii
Date:
Subject: pgsql: Fix integer overflow in debug message of walreceiver