pgsql: Return NULL for checksum failures if checksums are not enabled

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Return NULL for checksum failures if checksums are not enabled
Date: 2019-04-17 11:55:14
Message-ID: E1hGj9m-0005UV-6I@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Return NULL for checksum failures if checksums are not enabled

Returning 0 could falsely indicate that there is no problem. NULL
correctly indicates that there is no information about potential
problems.

Also return 0 as numbackends instead of NULL for shared objects (as no
connection can be made to a shared object only).

Author: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Reviewed-by: Robert Treat <rob(at)xzilla(dot)net>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/252b707bc41cc9bf6c55c18d8cb302a6176b7e48

Modified Files
--------------
doc/src/sgml/monitoring.sgml | 6 ++++--
src/backend/catalog/system_views.sql | 2 +-
src/backend/utils/adt/pgstatfuncs.c | 7 +++++++
src/test/regress/expected/rules.out | 2 +-
4 files changed, 13 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-04-17 17:37:05 pgsql: Minor jsonpath fixes.
Previous Message Michael Paquier 2019-04-17 01:11:35 pgsql: Fix thinko introduced by 82a5649 in slot.c