Created
June 3, 2025 21:48
-
-
Save joeywang/0ca1df16c6f6c23050d72dc12a2ba448 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- CONNECTION POOLING --- | |
num_init_children = 50 | |
max_pool = 1 | |
child_life_time = 300 | |
child_max_connections = 1000 | |
connection_life_time = 0 | |
# --- LOAD BALANCING --- | |
load_balance_mode = on | |
# Assuming backend0 is primary, backend1 is replica | |
backend_weight0 = 0 # Or a low value if primary also serves reads | |
backend_weight1 = 1 | |
streaming_replication_check = on | |
sr_check_period = 10 | |
delay_threshold = 1048576 # 1MB, adjust based on needs | |
# --- HEALTH CHECK --- | |
health_check_period = 10 | |
health_check_timeout = 5 | |
health_check_user = 'pgpool_hc_user' | |
health_check_password = 'your_secure_password' | |
health_check_database = 'template1' # Or a dedicated small DB | |
# --- LOGGING --- | |
log_destination = 'stderr' | |
# log_statement = 'ddl' # Or 'none' in high-performance production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment