Cluster name in ps output

From: Thomas Munro <munro(at)ip9(dot)org>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Cluster name in ps output
Date: 2014-05-05 10:00:34
Message-ID: CADLWmXUm=7Y3UORZnGMdSC6p1eymO0k0JkH4NKr4KstdWk0P7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
cluster-name-in-ps.patch text/x-patch 2.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-05-05 10:05:31 Recursive ReceiveSharedInvalidMessages not safe
Previous Message Andres Freund 2014-05-05 09:16:09 Re: Sending out a request for more buildfarm animals?