Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2T0GtU31851; Wed, 28 Mar 2001 19:16:55 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id TAA04827; Wed, 28 Mar 2001 19:12:45 -0500 (EST) From: Bruce Momjian Message-Id: <200103290012.TAA04827@candle.pha.pa.us> Subject: Re: Re: [HACKERS] Re: [PORTS] pgmonitor and Solaris In-Reply-To: <20299.985821796@sss.pgh.pa.us> "from Tom Lane at Mar 28, 2001 06:23:16 pm" To: Tom Lane Date: Wed, 28 Mar 2001 19:12:45 -0500 (EST) CC: Mathijs Brands , Larry Rosenman , Peter Eisentraut , PostgreSQL-development , PostgreSQL-ports , PostgreSQL-Admin X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200103/225 X-Sequence-Number: 1072 > > On Wed, Mar 28, 2001 at 05:33:05PM -0500, Bruce Momjian allegedly wrote: > >> Sure 'ps -U' will work, but it was reported that on Solaris, plain ps > >> can't show the postgres status display, while ucb/ps can. I don't need > >> specific columns. What I need is the postgres status parameters, and if > >> possible, a user restriction to ps for performance reasons. > > Looking at the sendmail code, it seems they use SPT_REUSEARGV (what we > call PS_USE_CLOBBER_ARGV) technique on Solaris. Possibly the problem is > simply that line 65 in src/backend/utils/misc/ps_status.c fails to > cover Solaris as one of the possible options: > > #elif defined(__linux__) || defined(_AIX4) || defined(_AIX3) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(ultrix) || defined(__ksr__) || defined(__osf__) || defined(__QNX__) || defined(__svr4__) || defined(__svr5__) > #define PS_USE_CLOBBER_ARGV > > Can someone check whether adding an appropriate Solaris symbol (which > one?) fixes the problem? > > The coding technique embodied in lines 63-67 pretty much sucks anyway, > since this platform-specific knowledge ought to be out in the port.h > files rather than hidden in the guts of the system. I don't want to > touch it right now, but I think we ought to have things like > > #define PS_STATUS_TECHNIQUE PS_USE_CLOBBER_ARGV > > in the port.h files, rather than these massive #ifdefs. Added to TODO: * Move platform-specific ps status display info from ps_status.c to ports -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026