]> granicus.if.org Git - postgresql/commit
Allocate enough shared string memory for stats of auxiliary processes.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 11 Apr 2018 20:39:49 +0000 (23:39 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 11 Apr 2018 20:39:49 +0000 (23:39 +0300)
commit811969b218ac2e8030dfbbb05873344967461618
treee6bf9b38edcdb54b04c1dcfdabab039726422f0c
parenta820b4c32946c499a2d19846123840a0dad071b5
Allocate enough shared string memory for stats of auxiliary processes.

This fixes a bug whereby the st_appname, st_clienthostname, and
st_activity_raw fields for auxiliary processes point beyond the end of
their respective shared memory segments. As a result, the application_name
of a backend might show up as the client hostname of an auxiliary process.

Backpatch to v10, where this bug was introduced, when the auxiliary
processes were added to the array.

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