{"id":19325854,"url":"https://github.com/jelastic-jps/postgres","last_synced_at":"2025-04-22T20:31:52.674Z","repository":{"id":44536613,"uuid":"264122985","full_name":"jelastic-jps/postgres","owner":"jelastic-jps","description":"PostgreSQL Primary-Secondary Cluster","archived":false,"fork":false,"pushed_at":"2024-11-08T12:29:21.000Z","size":1001,"stargazers_count":4,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-08T13:33:00.461Z","etag":null,"topics":["master-slave-replication","postgres","postgres-cluster","postgres-replication","postgresql","postgresql-cluster","postgresql-database","primary-secondary"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jelastic-jps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-05-15T07:10:25.000Z","updated_at":"2024-10-14T11:34:07.000Z","dependencies_parsed_at":"2024-02-23T14:26:46.669Z","dependency_job_id":"b676ffb5-c134-4f25-ba6d-f68ccf326e93","html_url":"https://github.com/jelastic-jps/postgres","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelastic-jps%2Fpostgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelastic-jps%2Fpostgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelastic-jps%2Fpostgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jelastic-jps%2Fpostgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jelastic-jps","download_url":"https://codeload.github.com/jelastic-jps/postgres/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223903480,"owners_count":17222551,"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":["master-slave-replication","postgres","postgres-cluster","postgres-replication","postgresql","postgresql-cluster","postgresql-database","primary-secondary"],"created_at":"2024-11-10T02:11:40.350Z","updated_at":"2024-11-10T02:11:40.970Z","avatar_url":"https://github.com/jelastic-jps.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostgreSQL Database Replication\n\nBasic ready-to-use PostgreSQL cluster, which implements asynchronous Primary-Secondary data replication within a pair of preconfigured database containers and load balancing.\n\n## Package Implementation Specifics\n\nThe presented PostgreSQL Replication solution is based on Virtuozzo Application Platform(VAP) certified stack templates which built:\n - for **[PostgreSQL](https://www.postgresql.org/)** database\n - for **[Pgpool-II](https://www.pgpool.net/mediawiki/index.php/Main_Page)** load balancer\n \n By default, package operates two database containers (Primary and Secondary, one per role) and makes data from Primary DB server to be asynchronously replicated to a standby one.\n In front of the cluster a scalable load balancer layer of Pgpool-II node can be added which provides load-balancing, monitoring and management of database cluster.\n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"images/pgpool-postgres-single-region-big-tip-black-font.svg\" width=\"450\"\u003e\n\u003c/p\u003e\n\nWithin the package, each database container receives the [vertical scaling](https://www.virtuozzo.com/application-platform-docs/automatic-vertical-scaling/) up to **32 dynamic cloudlets** (or 4 GiB of RAM and 12.8 GHz of CPU) that are provided dynamically based on the incoming load. And for the load balancer node the **6 dynamic cloudlets** provided by default. Subsequently, you can change the resource allocation limit by following the above-linked guide.\n\n## How to Install PostgreSQL Database Replication Package\n\nIn order to get PostgreSQL Database Replication solution instantly deployed, click the **Deploy to Cloud** button below and specify your email address within the opened widget. Then choose one of the [Virtuozzo Public Cloud](https://www.virtuozzo.com/application-platform-partners/) providers (in case you don’t have an account at the appropriate platform, it will be created automatically) and press **Install**.\n\n[![Deploy](images/deploy-to-cloud.png)](https://jelastic.com/install-application/?manifest=https://raw.githubusercontent.com/jelastic-jps/postgres/v2.0.0/manifest.yaml)\n\nTo install the package manually, log in to the Virtuozzo Application Platform dashboard with your credentials and [import](https://www.virtuozzo.com/application-platform-docs/environment-import/) link to the [**_manifest.yaml_**](https://github.com/jelastic-jps/postgres/blob/master/manifest.yaml) file (alternatively, you can locate this package via [VAP Marketplace](https://www.virtuozzo.com/application-platform-docs/marketplace/), *Clusters* section)\n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"images/postgresql-replication-installation.png\" width=\"550\"\u003e\n\u003c/p\u003e\n\n\nWithin the opened installation window, choose the PostgreSQL database version among available ones, type *Environment* name and optional *Display Name* ([environment alias](https://www.virtuozzo.com/application-platform-docs/environment-aliases/). Also, select the preferable [*Region*](https://www.virtuozzo.com/application-platform-docs/environment-regions/) (if several ones are available) and click **Install**.\nIf required you may disable Pgpool-II load balancer layer with respective toggle. \n\nWait a few minutes for VAP to prepare your environment and set up the required replication configurations. When finished, you’ll be shown the appropriate notification with data for PostgreSQL administration interface access. \n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"images/postgresql-replication-success-message.png\" width=\"400\"\u003e\n\u003c/p\u003e\n\n\nThis information will be also duplicated to you via email.\n\n### Cluster Entry Point\n\nIn case of no Pgpool-II nodes were added to cluster topology, use Primary node to access the cluster. And if the load balancing layer was deployed in front of the db cluster you may use any of Pgpool-II nodes as the entry point.\n\n### Cluster Management\n\nIn VAP the PostgreSQL cluster components can be managed either via [CLI](https://www.virtuozzo.com/application-platform-docs/ssh-access/) or UI.\n\n#### Database Management\n\nDatabase nodes have a built-in management administration panel phpPgAdmin. Use the only one on Primary node.\n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"images/phppgadmin.png\" width=\"600\"\u003e\n\u003c/p\u003e \n\nIf required, the separate node can be installed with more advanced PostgreSQL database management software [pgAdmin4](https://www.pgadmin.org/) via importing [manifest](https://github.com/jelastic-jps/pgadmin/blob/master/manifest.yaml) from VAP collection.\n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"images/pgadmin.png\" width=\"600\"\u003e\n\u003c/p\u003e\n\n#### Pgpool-II Management\n\nPgpool-II nodes can be also managed via user-friendly built-in Administration Panel [pgpoolAdmin](https://www.pgpool.net/docs/pgpoolAdmin/index_en.html).\n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"images/pgpool-admin.png\" width=\"600\"\u003e\n\u003c/p\u003e\n\nPgpool-II admin panel provides an ability to tune: \n - load balancing and even at database level. It means that you can specify how the requests to every database should be processed and balanced\n - connection pools\n - logging\n - replication\n - debugging\n - failover and failback\n - etc.\n\n\nTo find more details on PostgreSQL Replication package installation and use, refer to the [article](https://www.virtuozzo.com/company/blog/postgresql-auto-clustering-master-slave-replication/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjelastic-jps%2Fpostgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjelastic-jps%2Fpostgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjelastic-jps%2Fpostgres/lists"}