pgsql: Fix integer overflow in debug message of walreceiver

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix integer overflow in debug message of walreceiver
Date: 2015-03-13 23:25:04
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/4909cb59df40a011b041ce97a68e4d73a54da6ee

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

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-03-14 17:43:35 pgsql: Remove workaround for ancient incompatibility between readline a
Previous Message Robert Haas 2015-03-13 12:02:10 pgsql: Document the new custom scan APIs.