On Mon, Mar 2, 2026, at 5:15 PM, Tom Lane wrote:
> "Greg Burd" <[email protected]> writes:
>> On Sun, Mar 1, 2026, at 9:50 PM, Tom Lane 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, 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__)".
>
>> I've started a build/test on "icarus" with your patch applied. I'll let you
>> know how it goes, hopefully that won't take as long now.
Hey Tom,
> Oh, now THIS is interesting: I just updated to current OpenIndiana
> (previously I was on Dec-2025 or thereabouts), and now ps_status
> seems to be working *without* any patch! It works with the patch
> too, but now I'm thinking I hit some bug in their "ps" that got
> fixed and perhaps wasn't of long standing.
>
> So maybe we don't need this patch. I'd be interested to know what
> you see on whatever Solaris boxen you have. Note that the regression
> tests will not reveal anything --- you need to eyeball what "ps auxww"
> shows for a running postmaster and its children. With current HEAD
> and all-default settings, I see something like
>
> $ ps auxww | grep tgl
> ...
> tgl 17855 0.1 0.6 211008 21792 pts/2 S 22:07:24 0:00
> postgres -F
> tgl 17860 0.0 0.1 211056 3384 ? S 22:07:24 0:00
> postgres: background writer
> tgl 17856 0.0 0.1 211056 3480 ? S 22:07:24 0:00
> postgres: io worker 0
> tgl 17857 0.0 0.1 211056 3480 ? S 22:07:24 0:00
> postgres: io worker 1
> tgl 17858 0.0 0.1 211040 3112 ? S 22:07:24 0:00
> postgres: io worker 2
> tgl 17859 0.0 0.1 211072 3288 ? S 22:07:24 0:00
> postgres: checkpointer
> tgl 17862 0.0 0.1 212080 4148 ? S 22:07:24 0:00
> postgres: walwriter
> tgl 17863 0.0 0.2 212528 6224 ? S 22:07:24 0:00
> postgres: autovacuum launcher
> tgl 17864 0.0 0.2 212512 5940 ? S 22:07:24 0:00
> postgres: logical replication launcher
> ...
>
> if it's working, and a bunch of identical command lines if not.
$ ps -auxww | grep gburd
...
gburd 37564 0.0 0.6 1180392 85672 ? S 15:58:03 0:00
/scratch/pg/2026-03-03/bin/postgres -D /scratch/pg/2026-03-03/db
gburd 37565 0.0 0.3 1180392 44376 ? S 15:58:04 0:00
/scratch/pg/2026-03-03/bin/postgres -D /scratch/pg/2026-03-03/db
gburd 37566 0.0 0.2 1180392 27880 ? S 15:58:04 0:00
/scratch/pg/2026-03-03/bin/postgres -D /scratch/pg/2026-03-03/db
gburd 37567 0.0 0.2 1180392 27880 ? S 15:58:04 0:00
/scratch/pg/2026-03-03/bin/postgres -D /scratch/pg/2026-03-03/db
gburd 37568 0.0 0.2 1180392 27912 ? S 15:58:04 0:00
/scratch/pg/2026-03-03/bin/postgres -D /scratch/pg/2026-03-03/db
gburd 37569 0.0 0.3 1180392 48392 ? S 15:58:04 0:00
/scratch/pg/2026-03-03/bin/postgres -D /scratch/pg/2026-03-03/db
gburd 37571 0.0 0.3 1184488 45288 ? S 15:58:04 0:00
/scratch/pg/2026-03-03/bin/postgres -D /scratch/pg/2026-03-03/db
gburd 37572 0.0 0.3 1184904 50304 ? S 15:58:04 0:00
/scratch/pg/2026-03-03/bin/postgres -D /scratch/pg/2026-03-03/db
gburd 37573 0.0 0.3 1184888 37728 ? S 15:58:04 0:00
/scratch/pg/2026-03-03/bin/postgres -D /scratch/pg/2026-03-03/db
...
So, not working - and that's the patched version too. :(
$ uname -a
SunOS sun 5.11 illumos-31d3d510d0 sun4u sparc SUNW,A70
$ cat /etc/release
OpenIndiana Hipster 2025.12 (powered by illumos)
OpenIndiana Project, part of The Illumos Foundation (C) 2010-2025
Use is subject to license terms.
Assembled 27 December 2025
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc/13/lib/gcc/sparcv9-sun-solaris2.11/13.4.0/lto-wrapper
Target: sparcv9-sun-solaris2.11
Configured with:
/ws/oi-userland/components/developer/gcc-13/gcc-releases-gcc-13.4.0/configure
CC=/usr/gcc/13/bin/gcc CXX=/usr/gcc/13/bin/g++ F77=/usr/gcc/13/bin/gfortran
FC=/usr/gcc/13/bin/gfortran CFLAGS=-O2 CXXFLAGS=-O2 FFLAGS=' -O3 -mptr64
-mcpu=ultrasparc -mvis -mfsmuld -mno-app-regs' FCFLAGS=-O2 LDFLAGS=-RPT/lib
PKG_CONFIG_PATH=/usr/mariadb/10.6/lib/sparcv9/pkgconfig:/usr/openssl/3/lib/sparcv9/pkgconfig:/usr/lib/sparcv9/pkgconfig:/usr/lib/pkgconfig
--prefix=/usr/gcc/13 --mandir=/usr/gcc/13/share/man --bindir=/usr/gcc/13/bin
--includedir=/usr/include --infodir=/usr/gcc/13/share/info
--libdir=/usr/gcc/13/lib --libexecdir=/usr/gcc/13/libexec --localstatedir=/var
--sbindir=/usr/gcc/13/sbin --sysconfdir=/etc
--localedir=/usr/gcc/13/share/locale --sbindir=/usr/gcc/13/bin
--libdir=/usr/gcc/13/lib --libexecdir=/usr/gcc/13/lib --host
sparcv9-sun-solaris2.11 --build sparcv9-sun-solaris2.11 --target
sparcv9-sun-solaris2.11 --with-pkgversion='OpenIndiana 13.4.0-oi-0'
--with-bugurl=https://bugs.openindiana.org --without-gnu-ld
--with-ld=/usr/bin/ld
--with-build-time-tools=/usr/gnu/sparcv9-sun-solaris2.11/bin --with-gnu-as
--with-as=/usr/bin/gas LDFLAGS=-R/usr/gcc/13/lib --with-mulhigh-size=2048
--with-cpu=ultrasparc
--with-build-time-tools=/usr/gnu/sparcv9-sun-solaris2.11/bin
--with-build-config=no --enable-languages=c,c++,fortran,go,objc --enable-shared
--with-system-zlib --enable-plugins --enable-__cxa_atexit
--enable-initfini-array --with-diagnostics-urls=auto-if-env
enable_frame_pointer=yes
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.4.0 (OpenIndiana 13.4.0-oi-0)
What is your definition of "current OpenIndiana"? I'm in contact with the
maintainers of the distro I use so maybe I can nudge them to update.
I'm on an UltraSPARC 45 running the *only* OpenIndiana distro that still works
on this platform. To answer the implied question, yes I know SPARC is
essentially dead but I felt it might have some interesting coverage for us.
I've yet to prove that to be true.
> regards, tom lane
The good news is that I think that my attempts to build sparcv9 binaries and/or
use clang might be the root cause of the timeouts. Building with less
ambitious goals and using GCC I pass all the tests in a reasonable amount of
time.
The diff implementation (/usr/bin/diff) outputs "no differences found" rather
than the expected silence and exit 0 so that was causing issues but when I
fixed that (by putting a GNU diff in the path first ahead of /usr/bin) all
tests pass. Okay, they pass with your two patches applied. It takes a loooong
time to rebuild so I've not re-tested without those patches (yet) but AFAICT
they didn't cause issues and likely helped.
I'll update my build-farm.conf and get icarus flying closer to the Sun again
tomorrow.
best.
-greg