]> granicus.if.org Git - postgresql/commit
Make local copy of client hostnames in backend status array.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 11 Apr 2018 20:39:48 +0000 (23:39 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 11 Apr 2018 20:40:13 +0000 (23:40 +0300)
commit74dc05e01e5a195e432c6bd31f6504eb24b8316b
treed81e6aaf524ab877a9000b09a39a847a42460f6f
parent494f3cb5bbdae3d75b0100559a8a05020e8338ff
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
src/backend/postmaster/pgstat.c