Aurora Configuration Example
pgpool-II 4.2.10 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 8. Configuration Examples | Next |
Amazon Aurora for PostgreSQL Compatibility (Aurora) is a managed service for PostgreSQL . From user's point of view, Aurora can be regarded as a streaming replication cluster with some exceptions. First, fail over and online recovery are managed by Aurora . So you don't need to set failover_command , follow_primary_command , and recovery related parameters. In this section we explain how to set up Pgpool-II for Aurora.
8.4.1. Setting pgpool.conf for Aurora
-
Create pgpool.conf from pgpool.conf.sample-stream .
-
Set sr_check_period to 0 to disable streaming replication delay checking. This is because Aurora does not provide necessary functions to check the replication delay.
sr_check_period = 0
-
Enable enable_pool_hba to on so that md5 authentication is enabled ( Aurora always use md5 authentication).
enable_pool_hba = on
-
Create pool_password . See Section 6.2.3 for more details.
-
Set backend_hostname 0 for the Aurora cluster endpoint. Set backend_hostname 1 for the Aurora reader endpoint. Set appropriate backend_weight as usual. You don't need to set backend_data_directory .
backend_hostname0 = 'cluster endpoint' backend_hostname1 = 'reader endpoint'
-
Set ALWAYS_PRIMARY flag to the backend_flag for backend_hostname 0.
-
Because failover is managed by Aurora, set DISALLOW_TO_FAILOVER flag to the backend_flag for backend_hostname 0 and backend_hostname 1.
backend_flag0 = 'ALWAYS_MASTER|DISALLOW_TO_FAILOVER' backend_flag1 = 'DISALLOW_TO_FAILOVER'
-
Set health_check_period to 0 to disable health checking.
health_check_period = 0
-
Disable failover_on_backend_error to avoid failover when connecting to the backend or detecting errors on backend side while executing queries for the same reasons above.