I have two Postgres databases and I want to sync data between them.
So far I have these two containers, exactly the same with different posts and different names.
docker container run --name='p1' -d -p 5435:5432 -v /tmp/dbs/test/:/var/lib/postgresql/data postgres
docker container run --name='p2' -d -p 5436:5432 -v /tmp/dbs/test/:/var/lib/postgresql/data postgres
The problem happens when something changed.
If I change something in p1 like insert a row, then I can’t see it in p2.
But if I kill, and run containers again, then I can see the inserted data in both of them.
Why this is happening?
Is there a way to sync data between themes?