Re: Dead code in ps_status.c
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-02-16T06:16:14Z
Lists: pgsql-hackers
On Thu, Feb 16, 2023 at 6:34 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Thomas Munro <thomas.munro@gmail.com> 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. Thanks for looking. > > I guess (defined(sun) && !defined(BSD)) || defined(__svr5__) could be > > changed to just defined(sun) (surely there are no other living > > SysV-derived systems, and I think non-BSD Sun probably meant "Solaris > > but not SunOS"), but I don't know so I didn't touch that. > > 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 has reached EOL, it's just that the CPU is too old to be upgraded, so it's not testing a real OS that anyone would actually run PostgreSQL on). But from some googling[1], I think __sun, __sun__ and sun should all be defined. Ohh, but __svr5__ should not be. Solaris boxes define __svr4__, I was confused by the two fives. __svr5__ was SCO/Unixware, another dead OS[1], so I think we can just remove that one too. So, yeah, I think we should replace (defined(sun) && !defined(BSD)) || defined(__svr5__) with defined(__sun). (Hmph. We have all of __sun__, __sun and sun in the tree.) [1] https://stackoverflow.com/questions/16618604/solaris-and-preprocessor-macros [2] https://en.wikipedia.org/wiki/UNIX_System_V#SVR5_/_UnixWare_7
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Define PS_USE_CLOBBER_ARGV on GNU/Hurd.
- 29a3e22f3568 14.21 landed
- 3995e4a9d8c6 15.16 landed
- 32b236644d33 19 (unreleased) landed
- bcfca332f100 18.2 landed
- d66a922f9247 17.8 landed
- a1407daded69 16.12 landed
-
Remove obsolete platforms from ps_status.c.
- d2ea2d310dfd 16.0 landed