Skip to main content

🌐 Setting up PostgreSQL Primary-Secondary Cluster - Marketplace

⚠️ All configurations shown in this manual are simple and hypothetical examples. Adaptations may be necessary depending on your environment's topology and structure.

This guide shows how to perform the installation and initial access to the PostgreSQL Primary-Secondary Cluster installed via the SaveinCloud Marketplace.

📌 What is the PostgreSQL Primary-Secondary Cluster?

The PostgreSQL Primary-Secondary Cluster is a database topology that uses the asynchronous or synchronous replication mechanism between PostgreSQL instances, ensuring greater availability, resilience, and scalability in production environments.

In this model:

  • The Primary (or Master) is the main node, responsible for receiving all write operations (INSERT, UPDATE, DELETE).
  • The Secondary (or Replicas) are read nodes that maintain synchronized copies of the Primary's data. They can be used for queries (SELECT), load balancing, and as failover in case the primary node fails.

🔑 Benefits:

  • High availability: if the Primary node fails, a Secondary can take over its role.
  • Read scalability: multiple Secondaries can distribute queries, relieving the Primary's load.
  • Disaster recovery: data is continuously replicated, reducing the risk of loss.
  • Flexibility: supports synchronous (more secure) or asynchronous (faster) replication.

On SaveinCloud, the PostgreSQL Primary-Secondary Cluster can be deployed automatically via the Marketplace, already configured with monitoring and failover, simplifying management and providing a robust and scalable database for your applications.

Part 1 - Installing the PostgreSQL Primary-Secondary Cluster via Marketplace.

With the SaveinCloud panel open, we will first access the Marketplace tab.

imagem

With the Marketplace tab open, we will search for "PostgreSQL Primary-Secondary Cluster" and proceed with the installation.

imagem

Confirm the installation and wait for it to complete.

imagem

After the installation is complete, a screen will be displayed with all the credentials for accessing and configuring the PostgreSQL Primary-Secondary Cluster. We STRONGLY recommend reading the entire document for a better understanding of how it works.

If you have any questions during the configuration process, we recommend reading the official documentation provided by Postgres.

Database Replication with PostgreSQL: https://www.virtuozzo.com/application-platform-docs/postgresql-auto-clustering
Remote Access PostgreSQL: https://www.virtuozzo.com/application-platform-docs/remote-access-postgres
Import and Export Dump to PostgreSQL: https://www.virtuozzo.com/application-platform-docs/dump-postgres