Prevent possible crash reading pg_stat_activity.

Robert Haas <rhaas@postgresql.org>

Commit: c4a586c4860477ddae6d4f9cef88486f0e37c37e
Author: Robert Haas <rhaas@postgresql.org>
Date: 2016-04-21T18:02:15Z
Releases: 9.6.0
Prevent possible crash reading pg_stat_activity.

Also, avoid reading PGPROC's wait_event field twice, once for the wait
event and again for the wait_event_type, because the value might change
in the middle.

Petr Jelinek and Robert Haas

Files

PathChange+/−
src/backend/utils/adt/pgstatfuncs.c modified +21 −12