{"id":15807049,"url":"https://github.com/ghostbuster91/postgres-cluster-playground","last_synced_at":"2025-07-09T12:07:26.048Z","repository":{"id":90052829,"uuid":"287245197","full_name":"ghostbuster91/postgres-cluster-playground","owner":"ghostbuster91","description":null,"archived":false,"fork":false,"pushed_at":"2020-08-13T10:35:27.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T10:53:53.334Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostbuster91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-13T10:08:44.000Z","updated_at":"2020-08-13T10:35:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"06b75e61-5672-4c69-bac1-e1dd7819dd22","html_url":"https://github.com/ghostbuster91/postgres-cluster-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ghostbuster91/postgres-cluster-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbuster91%2Fpostgres-cluster-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbuster91%2Fpostgres-cluster-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbuster91%2Fpostgres-cluster-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbuster91%2Fpostgres-cluster-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostbuster91","download_url":"https://codeload.github.com/ghostbuster91/postgres-cluster-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbuster91%2Fpostgres-cluster-playground/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264455967,"owners_count":23611059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-05T03:00:48.174Z","updated_at":"2025-07-09T12:07:26.007Z","avatar_url":"https://github.com/ghostbuster91.png","language":"Shell","readme":"# postgres-cluster-playground\n\n\n1. start master node\n  - `docker-compose up -d master-db`\n\n2. create bootstrapping backup for slave-1\n- `docker-compose up backup`\n\n3. create bootstrapping backup for slave-2\n- `docker-compose up backup2`\n\n4. start slave nodes\n- `docker-compose up -d slave-db`\n- `docker-compose up -d slave-db2`\n\n5. stop master node\n- `docker-compose stop master-db`\n\n6. uncomment synchronous_standby_names in master-config (and change it if you want to)\n\n7. bring back master node\n- `docker-compose start master-db`\n\n8. verify that the replication works\n- login into the master node\n  1. `docker-compose exec master-db psql -U postgres`\n- check replication stats\n  1. `select * from pg_stat_replication`\n- create some table and fill it with data:\n  1. `create table example_data(content text not null);`\n  2. `insert into example_data(content) values('first entry');`\n- login into slave-db and verify that the data was replicated\n  1. `docker-compose exec slave-db psql -U postgres`\n  2. `select * from example_data;`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostbuster91%2Fpostgres-cluster-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostbuster91%2Fpostgres-cluster-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostbuster91%2Fpostgres-cluster-playground/lists"}