Add cluster_name GUC which is included in process titles if set.
authorAndres Freund <andres@anarazel.de>
Sun, 29 Jun 2014 12:15:09 +0000 (14:15 +0200)
committerAndres Freund <andres@anarazel.de>
Sun, 29 Jun 2014 12:15:09 +0000 (14:15 +0200)
commit51adcaa0df81da5e94b582d47de64ebb17129937
tree07bec85843d91c69bfbd554a586c8d5d85b2aff8
parenta6d488cb538c8761658f0f7edfc40cecc8c29f2d
Add cluster_name GUC which is included in process titles if set.

When running several postgres clusters on one OS instance it's often
inconveniently hard to identify which "postgres" process belongs to
which postgres instance.

Add the cluster_name GUC, whose value will be included as part of the
process titles if set. With that processes can more easily identified
using tools like 'ps'.

To avoid problems with encoding mismatches between postgresql.conf,
consoles, and individual databases replace non-ASCII chars in the name
with question marks. The length is limited to NAMEDATALEN to make it
less likely to truncate important information at the end of the
status.

Thomas Munro, with some adjustments by me and review by a host of people.
doc/src/sgml/config.sgml
doc/src/sgml/monitoring.sgml
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/misc/ps_status.c
src/include/utils/guc.h