Re: Dead code in ps_status.c

Michael Banck <mbanck@gmx.net>

From: Michael Banck <mbanck@gmx.net>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-08-26T13:55:30Z
Lists: pgsql-hackers

Attachments

Hi,

On Thu, Feb 16, 2023 at 04:52:33PM +1300, Thomas Munro wrote:
> 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.

I noticed Postgres no longer updates the process title on the Hurd, this
is because this was removed along other legacy platforms in this commit 
as it was using PS_USE_PS_STRING.

Just doing the same as what Linux does (PS_USE_CLOBBER_ARGV) works, so
I've added the __GNU__ definition to it. Process handling on Linux and
the Hurd are different enough that just changing it to __GLIBC__ would
not be advisable IMV.

Patch attached.


Michael

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Define PS_USE_CLOBBER_ARGV on GNU/Hurd.

  2. Remove obsolete platforms from ps_status.c.