]> granicus.if.org Git - postgresql/commit
Fix bugs in manipulation of PgBackendStatus.st_clienthostname.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 Apr 2014 01:30:14 +0000 (21:30 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 2 Apr 2014 01:30:14 +0000 (21:30 -0400)
commite83bee8ddcc75881002efb69a293b2b9d1d2be78
tree1d9f4283335005489432395004e4201be5255a47
parent7ef17dd71db11f2ac03154ec48fa0d5594b026de
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.
src/backend/postmaster/pgstat.c
src/backend/utils/adt/pgstatfuncs.c