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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alexey Klyukin <alexk(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ps buffer is incorrectly padded on the (latest) OS X
Date: 2010-09-04 00:33:29
Message-ID: AANLkTikRqgMUK9HGrwtLPsjRpRKhh0WVPSBkAMp9K_md@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 3, 2010 at 7:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
>> Alexey Klyukin <alexk(at)commandprompt(dot)com> 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 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
> of what PS_PADDING value to use since then.  My guess is that Apple
> must have changed this in OS X 10.2 or 10.3, because the userland
> Unix utilities were pretty well settled after that.
>
> So I think we could definitely apply this change to HEAD/9.0, and I'm
> strongly tempted to back-patch further than that.  Does anybody think
> that any pre-10.4 OS X versions are still in use, or would be likely
> to receive Postgres updates if they do exist?

I don't think we should back-patch this. It's not a bug fix, just a
convenience. We already have enough trouble with people not believing
that our minor releases are safe, and having non-critical stuff in the
release notes does not help our case.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-09-04 00:35:33 Re: Cost estimates for parameterized paths
Previous Message Tatsuo Ishii 2010-09-03 23:43:51 Re: regclass without error?