Re: [HACKERS] ps buffer is incorrectly padded on the (latest) OS X

2010-09-05 Thread Tom Lane
Heikki Linnakangas writes: > On 04/09/10 22:41, Tom Lane wrote: >> So we don't need a version check unless you're worried about somebody >> trying to run Postgres 9.x on OS X 10.2 (which was retired in 2003). > What happens if someone does? Crash, or just wonky ps output? If it's > the latter, s

Re: [HACKERS] ps buffer is incorrectly padded on the (latest) OS X

2010-09-05 Thread Heikki Linnakangas
On 04/09/10 22:41, Tom Lane wrote: I wrote: I tried this on a PPC Mac running 10.4.11, which is the oldest Mac OS I have handy at the moment. It worked fine. The existing coding in ps_status.c dates from late 2001, which means that it was first tested against OS X 10.1, and most likely we have

Re: [HACKERS] ps buffer is incorrectly padded on the (latest) OS X

2010-09-04 Thread Tom Lane
I wrote: > I tried this on a PPC Mac running 10.4.11, which is the oldest Mac OS > I have handy at the moment. It worked fine. The existing coding in > ps_status.c dates from late 2001, which means that it was first tested > against OS X 10.1, and most likely we have not rechecked the question >

Re: [HACKERS] ps buffer is incorrectly padded on the (latest) OS X

2010-09-03 Thread Robert Haas
On Fri, Sep 3, 2010 at 7:09 PM, Tom Lane wrote: > I wrote: >> Alexey Klyukin writes: >>> I always wondered why ps ax|grep postgres shows several extra blank lines >>> after the process name, i.e. > >> AFAIR it's always done that on OSX.  I thought we'd tried the '\0' >> padding way back when and

Re: [HACKERS] ps buffer is incorrectly padded on the (latest) OS X

2010-09-03 Thread Tom Lane
I wrote: > Alexey Klyukin writes: >> I always wondered why ps ax|grep postgres shows several extra blank lines >> after the process name, i.e. > AFAIR it's always done that on OSX. I thought we'd tried the '\0' > padding way back when and it didn't work nicely, but maybe Apple fixed > that. I t

Re: [HACKERS] ps buffer is incorrectly padded on the (latest) OS X

2010-09-03 Thread Tom Lane
Alexey Klyukin writes: > I always wondered why ps ax|grep postgres shows several extra blank lines > after the process name, i.e. AFAIR it's always done that on OSX. I thought we'd tried the '\0' padding way back when and it didn't work nicely, but maybe Apple fixed that.

[HACKERS] ps buffer is incorrectly padded on the (latest) OS X

2010-09-03 Thread Alexey Klyukin
Hi, I always wondered why ps ax|grep postgres shows several extra blank lines after the process name, i.e. 972 ?? Ss 0:00.69 postgres: writer process 973 ?? Ss 0:00.51 postgres: wal writer process (I put newlines instead of spaces there). By looking into the code I've found