Skip to content

"could not create any Unix-domain sockets" #83

@pat-s

Description

@pat-s

I am trying to update a PG-HA deployed via bitnami in k8s. I have extracted the data as usual. The call looks like

docker run -it -v /tmp/pg-15-16/:/var/lib/postgresql/ tianon/postgres-upgrade:15-to-16 --link

Due to how bitnami creates their structure, I also had to apply the following first:

echo "host all all all md5" > /tmp/pg-15-16/15/data/pg_hba.conf
touch /tmp/pg-15-16/15/data/postgresql.conf

So, so good.
However, it fails and inspecting the logs shows:

-----------------------------------------------------------------
  pg_upgrade run on Fri Nov 17 15:56:43 2023
-----------------------------------------------------------------

command: "/usr/lib/postgresql/15/bin/pg_ctl" -w -l "/var/lib/postgresql/16/data/pg_upgrade_output.d/20231117T155643.248/log/pg_upgrade_server.log" -D "/var/lib/postgresql/15/data" -o "-p 50432 -b  -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/postgresql'" start >> "/var/lib/postgresql/16/data/pg_upgrade_output.d/20231117T155643.248/log/pg_upgrade_server.log" 2>&1
waiting for server to start....2023-11-17 15:56:43.404 GMT [106] LOG:  starting PostgreSQL 15.4 (Debian 15.4-2.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2023-11-17 15:56:43.405 GMT [106] LOG:  could not set permissions of file "/var/lib/postgresql/.s.PGSQL.50432": Invalid argument
2023-11-17 15:56:43.405 GMT [106] WARNING:  could not create Unix-domain socket in directory "/var/lib/postgresql"
2023-11-17 15:56:43.406 GMT [106] FATAL:  could not create any Unix-domain sockets
2023-11-17 15:56:43.408 GMT [106] LOG:  database system is shut down
 stopped waiting
pg_ctl: could not start server
Examine the log output.

I can't wrap my head around what's going on. Checked permissions (all owned by postgres), checked no leftovers of other sockets in the data dirs. (NB: using my own arm64 image but also checked with the official tianon image). Any ideas or pointers are welcome!

(Q: Does it make a difference if the data got extracted from a PG-HA instance? It looks identical to a non-HA one on the first look.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions