Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

CSD for streaming Mode

...

  1. Trigger CSD in streaming mode

  2. Create Replication Slot on Primary

    1. 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)
  3. On Primary MP find and Tar the postgresql config files, Including

    1. postgres.conf

    2. pg_ident.conf

    3. pg_hba.conf

  4. On Standby MP receive tar ball of postgresql config files from Primary server

  5. 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

    1. 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
  6. Config directory setup: Extract files from tar ball recieved on step 4 and put them into the target config directory

  7. After setting up data director and config directory, restart standby server

  8. 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 )

  1. The source host in which the production PostgreSQL cluster is running.

  2. 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.

  3. 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.

  4. The Source PostgreSQL installation location along with the version of the cluster.

  5. 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.

  6. 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.

  7. The standby cluster version. This must be the same as the primary (there can difference in the release version)

  8. The Configuration name of the Cluster pair. The name is recommended to be a distinct name.

  9. The license key must be entered for the configuration to be created.

  10. Click on create configuration to create the new Cluster configuration pair.

...

Image Added

  1. The cluster configuration name

  2. The Primary/Source cluster is status, which is ONLINE. This shows the production cluster is up and running.

  3. The production clusters hostname

  4. The standby clusters hostname

  5. The option to start creating the DR cluster, by clicking the Set up now? option

Image Added

Clicking on the Cluster Configuration name displays the Actions that can be performed.

  1. Setting up a DR cluster

  2. Configuration Information

  3. Start/Stop Cluster

  4. Remove the configuration

Image Added