View Issue Details

IDProjectCategoryView StatusLast Update
0000816Pgpool-IIGeneralpublic2023-11-02 04:14
Reporterhenri_pilon@belll.net Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version4.3.7 
Summary0000816: pgpool-II 4.3 relationship with postgresql-12 and archive_cleanup_command off the primary PostgreSQL system
DescriptionMy apologies if this question has been asked before , and looking for some guidance as I think this is more postgresql 12 issue maybe.

Configuration - 3 nodes cluster (primary and 2 standby systems) with pgpool-II 4.3 and PostgreSQL 12

postgresql.conf off each systems.

shared_buffers = 1024MB
work_mem = 50MB
maintenance_work_mem = 256MB
effective_cache_size = 4096MB
max_wal_size = 2048MB
max_connections = 1000
checkpoint_timeout = 20min
checkpoint_completion_target = 0.9
autovacuum_vacuum_threshold = 5000
autovacuum_analyze_threshold = 5000
autovacuum_analyze_scale_factor = 0.2
log_min_duration_statement = 3000
commit_delay = 500
max_locks_per_transaction = 512
password_encryption = md5
wal_level = replica
archive_mode = on
archive_command = 'cp %p /var/lib/pgsql/archivedir/%f'
hot_standby = on
max_wal_senders = 10
max_replication_slots = 10
max_wal_size=200
wal_keep_segments = 10
port = 5432
wal_log_hints = on
restore_command = 'cp /var/lib/pgsql/archivedir/%f %p'
archive_cleanup_command = 'pg_archivecleanup /var/lib/pgsql/archivedir %r'

include_if_exists = '/var/lib/pgsql/12/data/myrecovery.conf'

 I understand the pgpool-II myrecovery.conf overwriting the restore_command off each standby systems.

physical slot replication is being utilize across the 2 standby systems, letting pgpool-II perform this configuration with the appropriate pcp command

Our issue is that off the primary server the dedicate disk reserve for postgres keeps filling up, especially the /var/lib/pgsql/archivedir folder.

My understanding the archive_cleanup_command action is only perform off the standby systems.

The way we are currently are managing the issue is by periodically performing a pg_basebackup off the primary system to a backup folder and then performing the archive_cleanup_command manually looking for the .backup file in the archivedir folder.
 
We can see the du -h /var/lib/pgsql/12/data/pg_wal file in this folder get deleted (purge) when the folder size gets close to the max_wal_size size, but du -h /var/lib/pgsql/archivedir keep growing.

I did several google search and unable to find any relevant information around this subject in relation to pgpool-ii.

What’s the proper way of managing the archivedir space off the primary system?

What’s the best practice for this area and any guidance would be appreciated ?

Hope my question make sense ...
 
Steps To Reproduceusing pg_bench, to create and re-create transaction in PostgreSQL keep monitoring disk space off the primary PostgreSQL system.

du -h /var/lib/pgsql/archivedir

vs

du -h /var/lib/pgsql/12/data/pg_wal
TagsNo tags attached.

Activities

henri_pilon@belll.net

2023-11-02 04:14

reporter   ~0004441

I think at this point I'm confident the "achivedir" folder space needs to be managed outside of both PGPOOL-II and PostgreSQL itslef.

Issue History

Date Modified Username Field Change
2023-10-25 03:41 henri_pilon@belll.net New Issue
2023-11-02 04:14 henri_pilon@belll.net Note Added: 0004441