CSD for streaming Mode
...
Trigger CSD in streaming mode
Create Replication Slot on Primary
Code Block SELECT * FROM pg_create_physical_replication_slot(SLOT_NAME, false, false) WHERE NOT EXISTS (SELECT * FROM pg_replication_slots WHERE slot_name = SLOT_NAME)
On Primary MP find and Tar the postgresql config files, Including
postgres.conf
pg_ident.conf
pg_hba.conf
On Standby MP receive tar ball of postgresql config files from Primary server
Data directory setup: Using pg_basebackup to initialize streaming backup from Standby to Primary to retrieve all files in data directory from Primary with the Replication Slot created on step 2
Code Block /opt/rh/rh-postgresql13/root/usr/bin/pg_basebackup -D /var/lib/pgsql/data/13/main -F plain -X stream -S dbvisit_2 -R --progress --verbose --checkpoint=fast -d postgres://postgres@postgresqlcentos1:5432
Config directory setup: Extract files from tar ball recieved on step 4 and put them into the target config directory
After setting up data director and config directory, restart standby server
Applying the latest changes on configuration coming CSD and persisting configuration data on Control Center
...
1. Introduction
In this section, we will see how to create a PostgreSQL configuration on Dbvisit Standby MP.It is important that before you continue with this section, you have to ensure the pre-requisites are met.
Operating Systems are compatible.
It is recommended that the primary and standby server operating systems match. Check the System Requirements page for supported OS platforms.
PostgreSQL Software is installed on both the primary and standby database servers.
You have a Primary Cluster already configured, and it is online and fully functional.
The Dbvisit multiplatform agent manager is installed in both primary and standby. The control center is either installed on a third server or installed with the standby server. The agentmanager must be installed using the same user as the Postgres binary installed user in Linux, and for Windows, the installed user must have all the prerequisites met as per System Requirements page.
The PostgreSQL configuration does not differ based on the methods used for creating the DR cluster.
2. Create PostgreSQL Configuration
The steps for creating a PostgreSQL configuration are simple and straightforward. From the New Configuration tab on GUI ( 1 ), click on Start with PostgreSQL ( 2 ).
Info |
---|
The data directory , config directory and the backup directory (If different from default) must be created on the standby server before creating the configuration. These locations can be different from the primary cluster, but its recommended to keep the same directory structure as primary to ensure uniformity across Production and DR Clusters. |
...
Choose your Primary Cluster server. In the below case, it is centlin71.oraclekiwi.co.nz
...
After the primary host is chosen ( 1 ), Below are the details that are displayed along with the option to choose your Standby Host ( 5 )
The source host in which the production PostgreSQL cluster is running.
The port in which the production cluster is running. In this case, the port is 5432( the default port, but this can be any port, and if multiple clusters are running on the source host, all the ports on which the clusters are running will be displayed.
The basic information on the cluster is displayed on the screen which included the Cluster name, Data directory, Configuration directory, the database names and sizes. In this case there are two user databases one and new.
The Source PostgreSQL installation location along with the version of the cluster.
Standby host, based on the number of hosts configured, a desired standby host can be chosen. The source host is not highlighted here, and the standby host must differ from the host.
The Standby Cluster port number. It is recommended to keep the same port as the source, but there is an option to use a different port number.
The standby cluster version. This must be the same as the primary (there can difference in the release version)
The Configuration name of the Cluster pair. The name is recommended to be a distinct name.
The license key must be entered for the configuration to be created.
Click on create configuration to create the new Cluster configuration pair.
...
The cluster configuration name
The Primary/Source cluster is status, which is ONLINE. This shows the production cluster is up and running.
The production clusters hostname
The standby clusters hostname
The option to start creating the DR cluster, by clicking the Set up now? option
Clicking on the Cluster Configuration name displays the Actions that can be performed.
Setting up a DR cluster
Configuration Information
Start/Stop Cluster
Remove the configuration