|pgpool-II 4.4.2 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.
Create pgpool.conf from pgpool.conf.sample. Make sure your pgpool.conf includes following line:
backend_clustering_mode = 'streaming_replication'
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_hostname0 for the Aurora cluster endpoint. Set backend_hostname1 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_hostname0.
Because failover is managed by Aurora, set DISALLOW_TO_FAILOVER flag to the backend_flag for backend_hostname0 and backend_hostname1.
backend_flag0 = 'ALWAYS_PRIMARY|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.