{"id":16445222,"url":"https://github.com/dgapitts/vagrant-c7-pg13-pg13","last_synced_at":"2025-08-02T04:32:47.881Z","repository":{"id":145829481,"uuid":"475973969","full_name":"dgapitts/vagrant-c7-pg13-pg13","owner":"dgapitts","description":"vagrant two node pg13 cluster with master-slave replication","archived":false,"fork":false,"pushed_at":"2022-07-19T17:22:49.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-10T22:41:52.233Z","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/dgapitts.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":"2022-03-30T17:00:09.000Z","updated_at":"2022-04-01T17:35:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"708a3aa8-dfd3-49c0-995c-3c4c566df246","html_url":"https://github.com/dgapitts/vagrant-c7-pg13-pg13","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dgapitts/vagrant-c7-pg13-pg13","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgapitts%2Fvagrant-c7-pg13-pg13","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgapitts%2Fvagrant-c7-pg13-pg13/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgapitts%2Fvagrant-c7-pg13-pg13/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgapitts%2Fvagrant-c7-pg13-pg13/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgapitts","download_url":"https://codeload.github.com/dgapitts/vagrant-c7-pg13-pg13/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgapitts%2Fvagrant-c7-pg13-pg13/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334611,"owners_count":24233793,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-11T09:43:41.775Z","updated_at":"2025-08-02T04:32:47.850Z","avatar_url":"https://github.com/dgapitts.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vagrant-c7-pg13-pg13 - vagrant two node pg13 cluster with master-slave replication\n\n## Getting started - how does the replication work\n\n### 1)  Extra config settings on master \n\nThese /24 trust settings are very generous but okay for \n```\n~/projects/vagrant-c7-pg13-pg13 $ grep replication master/pg_hba.conf |grep -v '#'\nhost    replication     postgres        192.168.60.0/24          trust\nhost    replication     rep             192.168.60.0/24          trust\n```\n\nWe need to specify at least 2 max_wal_senders\n```\n~/projects/vagrant-c7-pg13-pg13 $ grep max_wal_senders master/postgresql.conf \nmax_wal_senders = 2\t\t# max number of walsender processes\n```\n\n### 2) On the master, run initdb and standard pgbench\n\n```\n~/projects/vagrant-c7-pg13-pg13 $ grep 'initdb\\|bench' master.sh \n/usr/pgsql-13/bin/postgresql-13-setup initdb\n# setup bench1 linux user\nadduser bench1\n# setup bench1 postgres user and database\nsu -c \"createuser bench1\" -s /bin/sh postgres\nsu -c \"createdb bench1\"  -s /bin/sh postgres\nsu -c \"/usr/pgsql-13/bin/pgbench -i -s 30\" -s /bin/sh bench1\n```\n\n\n### 3) on the slave, we don't run initdb, instead we run \n\n```\n~/projects/vagrant-c7-pg13-pg13 $ grep pg_basebackup slave.sh\npg_basebackup -h 192.168.60.5 -D /var/lib/pgsql/13/data -U rep -v -P --wal-method=stream -R\n```\n\nwhich will both copy the base backup and also start the replication going... \n\n\n\n## Other notes (optional further tests)\n* [Initial Setup - based setup with two connected centos7 nodes - both with pg13 installed](docs/initial_setup.md)\n* [Initial Setup - notes on adding ssh keys manually](docs/initial_setup-adding_ssh_keys_manually.md)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgapitts%2Fvagrant-c7-pg13-pg13","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgapitts%2Fvagrant-c7-pg13-pg13","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgapitts%2Fvagrant-c7-pg13-pg13/lists"}