Skip to content

IsaevDimka/docker-postgres-replication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker PostgreSQL Replication

Docker PostgreSQL Master-Slave Replication, run:

make init

If changed env COMPOSE_PROJECT_NAME need change docker container name in images/postgresql-slave/postgresql.auto.conf

Requirements:

  • Docker

Check Replication Status:

docker compose exec -it postgresql-slave psql -U postgres -c "select pg_is_in_recovery();"
docker compose exec postgresql-master psql -U postgres -c \
"select client_addr, state from pg_stat_replication;"

License

MIT License (MIT)

About

Docker PostgreSQL master-slave replication

Resources

License

Code of conduct

Stars

Watchers

Forks