If setting up the audit log feature in a database multiplexing environment that has already been built, follow the procedure below.
Copy the pgaudit files
Copy the pgaudit files on the primary server and standby server.
Refer to step 1 in "6.2 Setup" for details on copying the pgaudit files.
Create the pgaudit configuration file
Create the pgaudit configuration file on the primary server. Copy the pgaudit configuration file you created to the standby server.
Refer to step 2 in "6.2 Setup" for details on creating the pgaudit configuration file.
Configure postgresql.conf
In the postgresql.conf file on the primary server and standby server, configure the parameters for using audit logs. Set the same values for the parameters.
Refer to step 3 in "6.2 Setup" and "6.7.2 Configuring Audit Log Retrieval" for details on the parameters to configure.
Configure the serverIdentifier.conf file of Mirroring Controller
In the serverIdentifier.conf file on the primary server and standby server, configure the parameters for using audit logs.
Refer to "6.7.2 Configuring Audit Log Retrieval" for details on the parameters to be set.
Start the instance
Start the instance of the primary server and standby server.
Create the pgaudit extension
Execute CREATE EXTENSION on the primary server to create a pgaudit extension.
Refer to step 5 in "6.2 Setup" for details on creating pgaudit extensions.
Configure the parameters in the pgaudit configuration file
Add/change the parameters of the pgaudit configuration file on the primary server. Copy the pgaudit configuration file with the added/changed parameters to the standby server.
Refer to "6.4 pgaudit Configuration File" and "6.7.2 Configuring Audit Log Retrieval" for details on the parameters to set.
Restart the instance
Restart the instance of the primary server and standby server.