{"id":20346116,"url":"https://github.com/huangsam/pgcluster","last_synced_at":"2026-04-14T10:31:16.299Z","repository":{"id":144752536,"uuid":"118865981","full_name":"huangsam/pgcluster","owner":"huangsam","description":"Playground for PostgreSQL clusters","archived":false,"fork":false,"pushed_at":"2018-01-31T18:07:39.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T15:48:10.289Z","etag":null,"topics":["clustering","database","postgresql","vagrant"],"latest_commit_sha":null,"homepage":"","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/huangsam.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":"2018-01-25T05:19:26.000Z","updated_at":"2020-05-08T06:30:46.000Z","dependencies_parsed_at":"2023-06-01T10:30:50.791Z","dependency_job_id":null,"html_url":"https://github.com/huangsam/pgcluster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/huangsam/pgcluster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huangsam%2Fpgcluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huangsam%2Fpgcluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huangsam%2Fpgcluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huangsam%2Fpgcluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huangsam","download_url":"https://codeload.github.com/huangsam/pgcluster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huangsam%2Fpgcluster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31793212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["clustering","database","postgresql","vagrant"],"created_at":"2024-11-14T22:11:26.598Z","updated_at":"2026-04-14T10:31:16.279Z","avatar_url":"https://github.com/huangsam.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Postgres Cluster\n\nThis is a playground for all things Postgres-related.\n\nIn particular, this repository covers the intricacies of deploying a master-slave configuration into production.\n\n## Vagrant Setup\n\nWhat was provided by `vboxnet`:\n\n    172.28.128.3 pgmaster\n    172.28.128.4 pgslave\n\nFeel free to change the IPs in the `Vagrantfile` as necessary, but note that certain configuration will need to modified accordingly.\n\n## VM Method\n\nHere are links to help you install Postgres:\n\n- [Setup: Debian](https://www.postgresql.org/download/linux/debian/)\n- [Setup: Ubuntu](https://www.postgresql.org/download/linux/ubuntu/)\n- [Setup: Red Hat](https://www.postgresql.org/download/linux/redhat/)\n\n### Postgres Master\n\nHere are the instructions:\n\n    # install postgres\n    passwd postgres\n    su - postgres\n    psql\n    # create sample data\n    # ssh-keygen\n    # ssh-copy-id postgres@172.28.128.4\n    # modify pg_hba.conf\n    # modify postgresql.conf\n    systemctl restart postgresql\n\n### Postgres Slave\n\nHere are the instructions:\n\n    # install postgres\n    passwd postgres\n    systemctl stop postgresql\n    # modify pg_hba.conf\n    # modify postgresql.conf\n    cd /var/lib/postgresql/9.6\n    pg_basebackup -R -h 172.28.128.3 -U replicator -D replica\n    mv main main.old\n    mv replica main\n    # modify main/recovery.conf\n    systemctl start postgresql\n\n## Container Method\n\nHere are links to help you install Docker:\n\n- [Setup: Debian](https://docs.docker.com/install/linux/docker-ce/debian/)\n- [Setup: Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/)\n- [Setup: CentOS](https://docs.docker.com/install/linux/docker-ce/centos/)\n\n### Postgres Master\n\n    # install docker\n    docker pull postgres:9.6\n    # build custom postgres\n    # create pgmaster container\n    docker exec -it pgmaster bash\n    gosu postgres psql\n    # create sample data\n    # modify pg_hba.conf\n    # modify postgresql.conf\n    docker restart pgmaster\n    docker exec -it pgmaster bash\n    gosu postgres psql\n\n### Postgres Slave\n\n    # install docker\n    docker pull postgres:9.6\n    # build custom postgres\n    # create pgslave container\n    docker stop pgslave\n    # create pgbackup container\n    cd /var/lib/postgresql\n    pg_basebackup -R -h 172.28.128.3 -U replicator -D replica\n    chown -R postgres:postgres replica\n    rm -rf data/*\n    mv replica/* data/\n    rmdir replica\n    # modify pg_hba.conf\n    docker start pgslave\n    docker exec -it pgslave bash\n    gosu postgres psql\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuangsam%2Fpgcluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuangsam%2Fpgcluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuangsam%2Fpgcluster/lists"}