Re: Dead code in ps_status.c

2023-03-10 Thread Andres Freund
Hi, On 2023-03-11 16:59:46 +1300, Thomas Munro wrote: > On Fri, Feb 17, 2023 at 3:38 AM Tom Lane wrote: > > Thomas Munro writes: > > > On Thu, Feb 16, 2023 at 6:34 PM Tom Lane wrote: > > > My GCC compile farm account seems to have expired, or something, so I > > > couldn't check on wrasse's hos

Re: Dead code in ps_status.c

2023-03-10 Thread Thomas Munro
On Fri, Feb 17, 2023 at 3:38 AM Tom Lane wrote: > Thomas Munro writes: > > On Thu, Feb 16, 2023 at 6:34 PM Tom Lane wrote: > > My GCC compile farm account seems to have expired, or something, so I > > couldn't check on wrasse's host (though whether wrasse is "live" is > > debatable: Solaris 11.3

Re: Dead code in ps_status.c

2023-02-16 Thread Thomas Munro
On Fri, Feb 17, 2023 at 3:38 AM Tom Lane wrote: > My account still works, and what I see on wrasse's host is > > tgl@gcc-solaris11:~$ gcc -x c /dev/null -dM -E | grep -i svr > #define __SVR4 1 > #define __svr4__ 1 > tgl@gcc-solaris11:~$ gcc -x c /dev/null -dM -E | grep -i sun > #define __sun 1 > #

Re: Dead code in ps_status.c

2023-02-16 Thread Tom Lane
Thomas Munro writes: > On Thu, Feb 16, 2023 at 6:34 PM Tom Lane wrote: >> Hm, is "defined(sun)" true on any live systems at all? > My GCC compile farm account seems to have expired, or something, so I > couldn't check on wrasse's host (though whether wrasse is "live" is > debatable: Solaris 11.3

Re: Dead code in ps_status.c

2023-02-15 Thread Thomas Munro
On Thu, Feb 16, 2023 at 6:34 PM Tom Lane wrote: > Thomas Munro writes: > > Therefore I think it is safe to drop the PS_USE_PS_STRING and > > PS_USE_CHANGE_ARGV code branches, remove a bunch of outdated comments > > and macro tests, and prune the defunct configure/meson probe. > > Seems reasonable

Re: Dead code in ps_status.c

2023-02-15 Thread Tom Lane
Thomas Munro writes: > Therefore I think it is safe to drop the PS_USE_PS_STRING and > PS_USE_CHANGE_ARGV code branches, remove a bunch of outdated comments > and macro tests, and prune the defunct configure/meson probe. Seems reasonable. Patch passes an eyeball check. > I guess (defined(sun) &

Dead code in ps_status.c

2023-02-15 Thread Thomas Munro
Hi, Here's some archeology I did a while back, but was reminded to post when I saw David's nearby performance improvements for ps_status.c. * there are no systems with HAVE_PS_STRINGS (ancient BSD) * setproctitle_fast() is in all live FreeBSD releases * setproctitle() is in all other BSDs * P