add chown-pgdata

This commit is contained in:
Heikki Linnakangas
2025-02-10 17:18:54 +02:00
parent 6dbe4184f3
commit 7263076c17
2 changed files with 14 additions and 1 deletions

View File

@@ -1991,7 +1991,8 @@ RUN systemctl enable \
pgbouncer \
postgres_exporter sql_exporter sql_exporter-autoscaling \
local_proxy \
compute_ctl
compute_ctl \
chown-pgdata
ENTRYPOINT ["/sbin/init"]

View File

@@ -0,0 +1,12 @@
# When running under neonvm-guest a separate disk is mounted to
# /var/db/postgres/compute. Make it owned by the postgres user.
[Unit]
Description=Change owner of /var/db/postgres/compute to postgres
[Service]
Type=oneshot
ExecStart=chown postgres:postgres /var/db/postgres/compute
RemainAfterExit=yes
[Install]
WantedBy=compute_ctl.service