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
>From c6e967c3f389b96d74c73a0e9a7e36e249565e95 Mon Sep 17 00:00:00 2001 From: Michael Banck <mba...@debian.org> Date: Mon, 25 Aug 2025 20:50:45 +0200 Subject: [PATCH] Define PS_USE_CLOBBER_ARGV on GNU/Hurd to (re-)enable process title changes. Until d2ea2d310dfdc40328aca5b6c52225de78432e01, the PS_USE_PS_STRINGS option was used on the GNU Hurd. As this option got removed and PS_USE_CLOBBER_ARGV appears to work fine nowadays on the Hurd, define this one to re-enable process title changes on this platform. --- src/backend/utils/misc/ps_status.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c index 4df25944deb..c141caa00ae 100644 --- a/src/backend/utils/misc/ps_status.c +++ b/src/backend/utils/misc/ps_status.c @@ -52,7 +52,7 @@ bool update_process_title = DEFAULT_UPDATE_PROCESS_TITLE; #define PS_USE_SETPROCTITLE_FAST #elif defined(HAVE_SETPROCTITLE) #define PS_USE_SETPROCTITLE -#elif defined(__linux__) || defined(__sun) || defined(__darwin__) +#elif defined(__linux__) || defined(__sun) || defined(__darwin__) || defined(__GNU__) #define PS_USE_CLOBBER_ARGV #elif defined(WIN32) #define PS_USE_WIN32 @@ -62,7 +62,7 @@ bool update_process_title = DEFAULT_UPDATE_PROCESS_TITLE; /* Different systems want the buffer padded differently */ -#if defined(__linux__) || defined(__darwin__) +#if defined(__linux__) || defined(__darwin__) || defined(__GNU__) #define PS_PADDING '\0' #else #define PS_PADDING ' ' -- 2.39.5