pgsql: Make local copy of client hostnames in backend status array.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make local copy of client hostnames in backend status array.
Date: 2018-04-11 21:01:16
Message-ID: E1f6Mrk-00033c-Af@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make local copy of client hostnames in backend status array.

The other strings, application_name and query string, were snapshotted to
local memory in pgstat_read_current_status(), but we forgot to do that for
client hostnames. As a result, the client hostname would appear to change in
the local copy, if the client disconnected.

Backpatch to all supported versions.

Author: Edmund Horner
Reviewed-by: Michael Paquier
Discussion: https://www.postgresql.org/message-id/CAMyN-kA7aOJzBmrYFdXcc7Z0NmW%2B5jBaf_m%3D_-77uRNyKC9r%3DA%40mail.gmail.com

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/dfc383cf3975ccb1053ef7431d1dfdcff1dfefea

Modified Files
--------------
src/backend/postmaster/pgstat.c | 7 +++++++
1 file changed, 7 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2018-04-11 21:28:10 Re: pgsql: New files for MERGE
Previous Message Simon Riggs 2018-04-11 20:00:22 Re: pgsql: New files for MERGE