Comments (9)
Looking at Google, it would appear that others have figured out how to accomplish this: https://www.google.com/search?q=docker+postgres+replication 😄
For example, https://github.com/DanielDent/docker-postgres-replication / https://hub.docker.com/r/danieldent/postgres-replication/
from postgres.
@volkanunsal Yes, 9.3 supports replication: http://www.postgresql.org/docs/9.3/static/runtime-config-replication.html
If you have any further questions, I think it’d be better if you asked in the corresponding PostgreSQL support issues. This repository is for specifics of the docker image, not PostgreSQL itself.
from postgres.
I've had a long back and forth on the Postgres support forums about this. I have eliminated all other possibilities, and exhausted the patience of the mailing list before posting here. The gist of the discussion can be boiled down to this gist. You will find the logs from both the server and the client on that gist. The problem is that the client does not start the walreceiver
service after it's booted up when it's installed using a Docker image. When I installed Postgres to the server directly, it doesn't have this problem.
I'm not a Postgres expert, nor a Docker expert. Hopefully, someone can look at this and point out what I did wrong. If there are any working examples of a Postgres replication setup inside a Docker container out there in the wild that you can point me to, that would be much appreciated as well.
from postgres.
You should have started this issue with the data you just provided here :). Can you also add a link to the discussion you’ve had on the Postgres forum so that we know what you’ve tried and what you haven’t?
I also want to set up PostgreSQL replication using docker, and will likely face the same problem then. I’m not sure when I’ll get around to it, though.
from postgres.
Here is the discussion. It's not threaded and might be hard to follow because it's just a Listserv.
from postgres.
@volkanunsal Were you able to get PG replication working between containers?
from postgres.
Nope.
from postgres.
Apparently past @tianon (#104 (comment)) actually had it working too, and present @tianon just doesn't remember:
The Postgres replication is a little bit complex, but this is definitely doable. I went through some of https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps to get something going and it's not too bad. The user created by our entrypoint script is a
SUPERUSER
, so it does have permission to replicate by default, so I think the most difficult parts here are setting the config (wal_level
, etc) and doing the initial replication.
from postgres.
Since this issue seems unrelated to any errors in the image itself, and being two years without further comment, I'm going to prune the issue.
If you believe this to be in error then let me know and I'll re-open it
Given that the issue is more of a usability question, it would be more suited for the Docker Community Forums, the Docker Community Slack, or Stack Overflow.
from postgres.
Related Issues (20)
- Initialization script when PGData is not empty HOT 8
- Failure oracle-libs installation
- Skip postgres restart on first run HOT 1
- Reproducible SIGSEGV in query HOT 1
- Separating config using PGDATA does not seem to behave as described in the docs HOT 12
- Upgrade older images to OCI Format or Docker Image manifest v2, schema 2 HOT 3
- Add a HEALTHCHECK to the images HOT 2
- include_dirs env var HOT 4
- Add "build from github.com/postgres/postgres" variation HOT 2
- PostgreSQL 17beta1 HOT 3
- CVE-2023-24538 CVE-2023-24540 HOT 2
- Use of GOSU introduces critical CVEs HOT 2
- PostgreSQL error ( log Docker) HOT 1
- Issue of working with pgsql in my vps machine with easypanel
- Nurlanhajizada
- Please help, I have persisted it, but the table and data are not restored after restarting the container. HOT 1
- please add a Container shell access and viewing MySQL logs directly HOT 3
- associate --user id with the internal postgres user id HOT 13
- Kill a postgres container immediately HOT 5
- Remove gosu HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgres.