Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .agents/setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail

# Cloud session containers don't set USER.
: "${USER:=$(id -un)}"

repo_root="$(git rev-parse --show-toplevel)"
cd "$repo_root"

Expand Down Expand Up @@ -60,8 +63,10 @@ sudo sed -E -i \
-e 's/^#?synchronous_commit[[:space:]]*=.*/synchronous_commit = off/' \
"$postgresql_config"

sudo systemctl enable --now postgresql
sudo systemctl restart postgresql
if [[ "$(systemctl is-system-running 2>/dev/null || true)" =~ ^(running|degraded|starting)$ ]]; then
sudo systemctl enable --now postgresql
fi
sudo pg_ctlcluster "$postgresql_version" main restart

if ! pg_isready -h localhost >/dev/null; then
echo "PostgreSQL did not become ready" >&2
Expand Down
Loading