commit 6163c881a6c0a462f1ac37d17eeacb2085c5b925 parent 4390ec08649680ae2360157045f983c5d32c980d Author: Christian Grothoff <christian@grothoff.org> Date: Mon, 22 Dec 2025 17:47:58 +0100 improve logic to detect installed DB version Diffstat:
| M | contrib/ci/jobs/2-test/3-startdb.sh | | | 12 | +++++++++--- |
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/contrib/ci/jobs/2-test/3-startdb.sh b/contrib/ci/jobs/2-test/3-startdb.sh @@ -1,7 +1,13 @@ #!/bin/bash set -evux -sudo -u postgres /usr/lib/postgresql/17/bin/postgres -D /etc/postgresql/17/main -h localhost -p 5432 & +PG_BIN="$(pg_config --bindir)" +PG_ETC="$(pg_config --sharedir | sed 's|/share/postgresql|/etc/postgresql|") +export PGPORT=5432 +sudo -u postgres "${PG_BIN}/pg_ctl" \ + start \ + -D ${PG_ETC}/main \ + -o "-h localhost -p $PGPORT" sleep 10 -sudo -u postgres createuser -p 5432 root -sudo -u postgres createdb -p 5432 -O root talercheck +sudo -u postgres createuser -p "$PGPORT" root -s -w +sudo -u postgres createdb -p "$PGPORT" -O root talercheck