pgsql: Fix bugs in manipulation of PgBackendStatus.st_clienthostname.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix bugs in manipulation of PgBackendStatus.st_clienthostname.
Date: 2014-04-02 01:30:58
Message-ID: E1WVA14-0002xb-HY@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix bugs in manipulation of PgBackendStatus.st_clienthostname.

Initialization of this field was not being done according to the
st_changecount protocol (it has to be done within the changecount increment
range, not outside). And the test to see if the value should be reported
as null was wrong. Noted while perusing uses of Port.remote_hostname.

This was wrong from the introduction of this code (commit 4a25bc145),
so back-patch to 9.1.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/682c5bbec5d9533d2d654d6a096c36bbae9f5bd0

Modified Files
--------------
src/backend/postmaster/pgstat.c | 9 +++++----
src/backend/utils/adt/pgstatfuncs.c | 3 ++-
2 files changed, 7 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-04-02 18:30:16 pgsql: De-anonymize the union in JsonbValue.
Previous Message Heikki Linnakangas 2014-04-01 19:50:00 pgsql: Fix bug in the new GIN incomplete-split code.