
PostGres Database Replication Using Pglogical
Originally published on Hashnode This is an example of PostgreSQL database replication using the pglogical extension. In this example, I used Docker containers, with each container having its own database. When data is written to the primary database, the secondary container receives the same data. π¨βπ»A man proudly told his wife, βIβm an SQL DB admin!β She threw him out of the houseβ¦ Because he had one to many relationships π β SQL News Network Start Docker If you have docker engine use sudo systemctl start docker sudo systemctl enable docker // if you want start at boot Or if you have docker desktop use this in debian Linux (installed from .deb package) systemctl --user start docker-desktop Create configuration files You need to create 2 config files as shown in this folder tree /<PATH_TO_PROJECT>/docker/ β βββ Dockerfile.pglogical βββ postgres/ βββ docker-compose.yml Define config files docker-compose.yml is the file that defines how to run the containers. cd <RATH_TO_PROJECT>/docker
Continue reading on Dev.to
Opens in a new tab



