I guess the question is where this should be available as well. At the very least I'd want to reference it in log_line_prefix as well?
Good idea, I will look into that.
See v2 patch attached which lets you use %C for cluster name in the log prefix.
Maybe it would be overkill, but seeing the various responses about which information belongs in the ps string, I guess we could also use a format string with %blah fields for that. Then the Debian/Ubuntu package users who tend to think of the major version + name as the complete cluster identifier could use "[%V/%C] ..." to get "postgres: [9.3/main] ...", and others could throw in a "%P" to see a port number.