Versions Compared

Key

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

...

Summary of the end of the DR Cluster creation from the primary. The automatic standby update and the observer components are automatically enabled.

Image RemovedImage Added

( 1 ) The configuration name along with the time gap between standby cluster and primary cluster.

...

( 8 ) Click Start to create the DR cluster.

Image RemovedImage RemovedImage RemovedImage AddedImage AddedImage Added

( 1 ) The configuration Name

...

WAL Streaming (Hot Standby)

WAL Streaming replication allows real-time transfer of primary cluster database changes to standby. The databases are kept in sync. There are three processes wal receiver, wal sender and startup. The wal receiver process sends the LSN(Log sequence Number) up until the standby (slave) has replayed and send it to the primary. The wal sender process sends the WAL data until the latest LSN starting from the LSN sent by the wal receiver and the same process writes the data to the WAL Segments. The startup process on slave that replays the data written to WAL segment.

A few parameters need to be updated on the primary cluster to ensure that the streaming happens.

In Postgresql.conf file we need to ensure that the listen_address parameter is set to provide a list of IP addresses that it listens to. This is usually the standby server address. In the below example we have kept the listen_address to “*” so it listens to all the addresses.

We also have to change the pg_hba.conf file to provide connections to the standby server and also add replication connections from localhost to the remote host.

Code Block
host    all             all             10.0.2.23/24 (Address of remote server)          trust

host    replication     all                 10.0.2.22/30   (Address of local server needed after Graceful Switchover)        trust  
host    replication     all                 10.0.2.23/30  (Address of remote server)         trust

Line 1 of the above code block is just for remote connection

lines 3 &4 are mainly for replication connections that do for all privileged users (usually postgres or some specific user). Line 3 is a local server address and is mainly used to ensure that the switchback happens without any issues.

( 1 ) Postgres configuration name

( 2 ) The option to create a Hot standby. This will enable the customers to use the standby cluster for reporting purposes since the cluster databases will be opened in read-only.

( 3 ) WAL Streaming method used for creating the standby cluster

( 4 ) The default user(postgres) used for creating the standby cluster. The password would be the host password for postgres users.

( 5 ) The observer component is enabled by default. This would automatically monitor the configuration when the DR cluster is created.

( 6 ) Click start to create the DR cluster.

...

( 1 ) The configuration name and the status of the streaming replication (In Sync)

( 2 ) The primary cluster status with port number and server name.

( 3 ) The method of replication used for creating the standby (Streaming)

( 4 ) The standby cluster status with port number and server name.

...