To get a core dump I would need to rebuild. PostrgreSQL from ports didn;t have what I needed pre built.
# This file is auto-generated by 'make config'.
# Options for postgresql14-server-14.6_1
_OPTIONS_READ=postgresql14-server-14.6_1
_FILE_COMPLETE_OPTIONS_LIST=DEBUG DOCS DTRACE GSSAPI INTDATE LDAP LLVM LZ4 NLS OPTIMIZED_CFLAGS PAM SSL TZDATA XML
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_UNSET+=DOCS
OPTIONS_FILE_UNSET+=DTRACE
OPTIONS_FILE_SET+=GSSAPI
OPTIONS_FILE_SET+=INTDATE
OPTIONS_FILE_SET+=LDAP
OPTIONS_FILE_SET+=LLVM
OPTIONS_FILE_SET+=LZ4
OPTIONS_FILE_SET+=NLS
OPTIONS_FILE_SET+=OPTIMIZED_CFLAGS
OPTIONS_FILE_SET+=PAM
OPTIONS_FILE_SET+=SSL
OPTIONS_FILE_UNSET+=TZDATA
OPTIONS_FILE_SET+=XML
Also, which PID do I attach GDB to?
e.g.
root@postgresql-3:~ # ps awxu | grep post
postgres 15892 0.0 0.0 189272 36072 - SsJ 02:04 0:05.72 /usr/local/bin/postgres -D /var/db/postgres/data14
postgres 15894 0.0 0.0 189272 46632 - IsJ 02:04 0:00.02 postgres: checkpointer (postgres)
postgres 15895 0.0 0.0 189272 36108 - SsJ 02:04 0:00.13 postgres: background writer (postgres)
postgres 15896 0.0 0.0 189272 36100 - SsJ 02:04 0:00.13 postgres: walwriter (postgres)
postgres 15897 0.0 0.0 191832 36472 - SsJ 02:04 0:00.50 postgres: autovacuum launcher (postgres)
postgres 15898 0.0 0.0 189272 36052 - SsJ 02:04 0:00.07 postgres: archiver (postgres)
postgres 15899 0.0 0.0 35752 20004 - SsJ 02:04 0:01.55 postgres: stats collector (postgres)
postgres 15900 0.0 0.0 191832 36312 - IsJ 02:04 0:00.02 postgres: logical replication launcher (postgres)
postgres 15947 0.0 0.1 228380 131336 - IsJ 02:06 0:00.28 postgres: maps Alternate History 10.128.6.9(56280) (postgres)
postgres 15990 0.0 0.1 228380 122996 - IsJ 02:09 0:00.21 postgres: maps Alternate History 10.128.6.9(56536) (postgres)
root 39871 0.0 0.0 12840 2328 2 S+J 14:40 0:00.00 grep post
If it's the individual database ones like 15947 or 15990 in the above example, I have no way of knowing which one will get a SIGBUS. Is the main process (e.g. 15892) OK?