Cluster name in ps output - Mailing list pgsql-hackers

From Thomas Munro
Subject Cluster name in ps output
Date
Msg-id CADLWmXUm=7Y3UORZnGMdSC6p1eymO0k0JkH4NKr4KstdWk0P7g@mail.gmail.com
Whole thread Raw
Responses Re: Cluster name in ps output
Re: Cluster name in ps output
List pgsql-hackers
Hi

When running more than one cluster I often find myself looking at
the output of 'iotop' or other tools wondering which
cluster's "wal receiver process" or "checkpointer process" etc
I'm seeing.  Obviously it's easy enough to find out (for example
by looking at a tree view in htop/ps that shows the -D parameter
of the parent postmaster), but I thought it could be useful to be
able to give a name to the cluster and include it in the ps
output.  Here is a strawman patch that does that.

If cluster_name is not set, it defaults to the empty string and
the ps output is unchanged.  If it's set to 'foox' the ps output
includes that string in square brackets:

  postgres: [foox] checkpointer process
  postgres: [foox] writer process
  postgres: [foox] wal writer process
  postgres: [foox] autovacuum launcher process
  postgres: [foox] stats collector process
  postgres: [foox] munro foodb [local] idle

I would be grateful for any feedback.  Thanks,

Thomas

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Sending out a request for more buildfarm animals?
Next
From: Andres Freund
Date:
Subject: Recursive ReceiveSharedInvalidMessages not safe