-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running this image as replica with mounted volume or static volume fails #227
Comments
workaround for the issue is to add /* at the end (rm -rf ${PGDATA}/*) of |
Hello @peza, Thank you for bringing this to our attention and providing the workaround. The streaming-replication-docker repository contains an outdated example for setting up replication. We will deprecate this repository soon. We have already removed the link from our documentation (timescale/docs#2894). Please have a look at our Helm Charts for a more advanced and more recent configuration (https://github.com/timescale/helm-charts/tree/main/charts/timescaledb-single). |
With guide from official documentation
https://docs.timescale.com/self-hosted/latest/replication-and-ha/configure-replication/
pointing to
https://github.com/timescale/streaming-replication-docker/blob/master/replication.sh
the process fails with
"rm: can't remove '/var/lib/postgresql/data/pgdata': Resource busy"
on line 44 "rm -rf ${PGDATA}" of the replication.sh file.
I've also updated the Dockerfile to use version 16 instead of 10, which made me comment the lines 66 to 74 of replication.sh and adding
cat >> ${PGDATA}/postgresql.conf <<EOF
primary_conninfo = 'host=${REPLICATE_FROM} port=5432 user=${POSTGRES_USER} password=${POSTGRES_PASSWORD} application_name=${REPLICA_NAME}'
primary_slot_name = '${REPLICA_NAME}_slot'
EOF
below commented lines,
to conform to official TimescaleDB documentation.
This docker image prevents deleting the folder if static volume is used.
docker run --name timescale-replica -p 5433:5432 --network timescale-replication --env-file replica.env -v replica:/var/lib/postgresql/data/pgdata timescale-replica
or
docker run -d --name timescale-replica -p 5433:5432 --network timescale-replication --env-file replica.env -v replica:/var/lib/postgresql/data/pgdata timescale/timescaledb:latest-pg16
to use the original docker image
Creating a replica with static or mounted volume from this docker image is not possible
The text was updated successfully, but these errors were encountered: