Re: [HACKERS] Re: pgmonitor and Solaris
Pete Forman <pete.forman@westerngeco.com>
From: Pete Forman <pete.forman@westerngeco.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Mathijs Brands <mathijs@ilse.nl>, Bruce Momjian <pgman@candle.pha.pa.us>, Larry Rosenman <ler@lerctr.org>, Peter Eisentraut <peter_e@gmx.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>, PostgreSQL-ports <pgsql-ports@postgresql.org>, PostgreSQL-Admin <pgsql-admin@postgresql.org>
Date: 2001-03-29T10:05:52Z
Lists: pgsql-hackers
Tom Lane previously wrote: > 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? Tom Lane writes: > The interesting point about this is that the 7.0.3-on-2.7 > installation *is* managing to change its PS display. So either > Solaris 2.8 retrogressed (different predefined symbols maybe?), or > we broke the code since 7.0.3. > > Anyway I think the right thing to look at is why the 7.1 install is > not managing to update the display. The identifier sun is not set if the compiler is in -Xc mode. It would be safer to use to use __sun which is defined in all compiler modes. The symbols defined in all modes are __sun, __unix, __SUNPRO_C=0x500 (or 400, 420, etc.), __`uname -s`_`uname -r` (e.g. __SunOS_5_8), __sparc (SPARC), __sparcv9 (SPARC with -xarch=v9|v9a), __i386 (x86), __BUILTIN_VA_ARG_INCR, __SVR4. That applies to the native compiler. Perhaps someone else could establish what Solaris specific defines are available in gcc. -- Pete Forman -./\.- Disclaimer: This post is originated WesternGeco -./\.- by myself and does not represent pete.forman@westerngeco.com -./\.- opinion of Schlumberger, Baker http://www.crosswinds.net/~petef -./\.- Hughes or their divisions.