Re: Areas for Solaris support modernization
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: "Greg Burd" <greg@burd.me>, Thomas Munro <thomas.munro@gmail.com>
Date: 2026-03-02T02:50:27Z
Lists: pgsql-hackers
Attachments
- restore-solaris-ps_status.patch (text/x-diff) patch
I wrote: > Also, while playing with said local OpenIndiana image, I noticed > that ps_status.c isn't working: "ps auxww" shows all the child > processes with the same command line as the postmaster. I thought > maybe we'd diked out something important in d2ea2d310, but none > of the code removed there claims to apply to Solaris. So maybe > it never worked on Solaris? Anyway, there's room for improvement > there if anyone cares to investigate. Huh: after a bit of testing, it seems that the PS_USE_CHANGE_ARGV mode removed by d2ea2d310 is indeed the right thing to use on Solaris. Looking back at that discussion thread, we were a bit confused about which predefined macros are provided on Solaris. To believe that the pre-existing code actually worked on Solaris, you'd have to assume that "BSD" is predefined on that platform. It does not get defined on my OpenIndiana image, but maybe sometime in the stone age Solaris defined it? Anyway, here's a slightly cleaned-up reversion of the relevant bits of d2ea2d310, with PS_USE_CHANGE_ARGV now selected by "defined(__sun)" not the previous logic "(defined(BSD) || defined(__hurd__)) && !defined(__darwin__)". BTW, I notice that with this, PS_PADDING is set to '\0' in exactly the cases that select PS_USE_CLOBBER_ARGV. I'm not inclined to merge the logic, because maybe we'll find some weird platform where the conditions are different. But it seems plausible and comforting that there are fewer underlying behaviors than we thought. regards, tom lane
Commits
-
Switch the semaphore API on Solaris to unnamed POSIX.
- 0123ce131fca 19 (unreleased) landed
-
Fix aclitemout() to work during early bootstrap.
- 2eb87345e18e 19 (unreleased) landed