Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1SLb-0005A5-2v for pgsql-general@arkaria.postgresql.org; Sun, 26 Dec 2021 12:09:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n1SLY-0006xV-2c for pgsql-general@arkaria.postgresql.org; Sun, 26 Dec 2021 12:09:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1SLX-0006sZ-EC for pgsql-general@lists.postgresql.org; Sun, 26 Dec 2021 12:09:51 +0000 Received: from box.lpossamai.net ([109.205.181.50]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1SLQ-0004Wf-F4 for pgsql-general@lists.postgresql.org; Sun, 26 Dec 2021 12:09:50 +0000 Received: from authenticated-user (box.lpossamai.net [109.205.181.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by box.lpossamai.net (Postfix) with ESMTPSA id 07A74112016C for ; Mon, 27 Dec 2021 01:09:39 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sud0.nz; s=mail; t=1640520581; bh=/HmLpmDetJ56sPdpjS4+KdVqvqeu/WAdDWk1HiZAQyQ=; h=From:Subject:Date:To:From; b=ZZt8ES7+HYDa+D58y24awbzZDVJgsFZmjXbYq/PQWq8Au+8Y3g2HWAvkuBxrvvCEi nV9M6OPLUnZNTIM94kay2PCQQJykoJ0GkyO6cg8TSr9TdRZ+VclehIyqsVxIUURxVs IXz5vwNlI3zlbgWS+MkCUT/cP6gwyvsvf5a0yT8KMrBB2Ae/yzhuVT0wysC/QjGhHd jahlsjj+feiHNR8suts8V8WdZc4nxkhgO9IKlc28cYbHfxAM/a9wEohZplVTn0UuZz /wDtIvj7phu6ptlwkM4h5lQ/kqlfJ0r3VpeMvjgDcLRWfsRR5bkzHcrV936dYSUo4O WuMIOHa8389Lg== From: Lucas Content-Type: multipart/alternative; boundary="Apple-Mail=_05FD2864-B4B0-47B3-8339-623D8382CEC4" Mime-Version: 1.0 Subject: Wal files in /pgsql/14/main/pg_wal not removed Message-Id: <433EA59F-22DF-4ADA-AB43-F53A263C43D2@sud0.nz> Date: Mon, 27 Dec 2021 01:09:31 +1300 To: pgsql-general@lists.postgresql.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_05FD2864-B4B0-47B3-8339-623D8382CEC4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi guys, and happy holidays. My /pgsql/14/main/pg_wal directory is filling up. The server is not = respecting the wal_keep_size =3D 100GB. I have no replication slots in = this server, and I have already restarted PostgreSQL.=20 I don=E2=80=99t know what else to look for. Would appreciate any help. My postgresql.conf can be found below: data_directory =3D '/pgsql/14/main' hba_file =3D '/etc/postgresql/14/main/pg_hba.conf' ident_file =3D '/etc/postgresql/14/main/pg_ident.conf' external_pid_file =3D '/var/run/postgresql/14-main.pid' unix_socket_directories =3D '/var/run/postgresql' # SSL ssl =3D on ssl_cert_file =3D '/etc/ssl/certs/ssl-cert-snakeoil.pem' ssl_key_file =3D '/etc/ssl/private/ssl-cert-snakeoil.key' listen_addresses =3D '*' port =3D 5432 random_page_cost =3D 1.1 max_connections =3D 400 shared_buffers =3D 3840MB statement_timeout =3D 0 work_mem =3D 209719830kB maintenance_work_mem =3D 960MB shared_preload_libraries =3D 'pg_stat_statements' pg_stat_statements.track =3D all track_activity_query_size =3D 102400 synchronous_commit =3D off synchronous_standby_names =3D '*' wal_buffers =3D 16MB wal_level =3D replica # PG 14 new parameters min_wal_size =3D 1GB max_wal_size =3D 4GB max_worker_processes =3D 2 max_parallel_workers_per_gather =3D 1 max_parallel_workers =3D 2 max_parallel_maintenance_workers =3D 1 # Replication parameters max_replication_slots =3D 15 hot_standby_feedback =3D on hot_standby =3D on fsync =3D on wal_keep_size =3D 100GB restore_command =3D 'cp /data/wal_archive/%f %p' checkpoint_completion_target =3D 0.9 archive_mode =3D on archive_command =3D '/pgsql/pg-archive-wal-to-slaves.sh "%p"' archive_timeout =3D 300 max_wal_senders =3D 50 effective_cache_size =3D 11520MB logging_collector =3D on log_directory =3D '/data/postgresql/log' log_filename =3D 'postgresql.log.%a' log_rotation_age =3D 1440 log_rotation_size =3D 0 log_truncate_on_rotation =3D on log_min_duration_statement =3D 1000 log_line_prefix =3D '%t [%p]: [%l-1] user=3D%u,db=3D%d,app=3D%a,client=3D%= h ' log_lock_waits =3D on log_statement =3D 'ddl' log_timezone =3D 'UTC' stats_temp_directory =3D '/var/run/postgresql/main.pg_stat_tmp' autovacuum =3D on log_autovacuum_min_duration =3D 1000 autovacuum_max_workers =3D 5 autovacuum_naptime =3D 40s autovacuum_vacuum_threshold =3D 200 autovacuum_analyze_threshold =3D 150 autovacuum_vacuum_scale_factor =3D 0.02 autovacuum_analyze_scale_factor =3D 0.005 datestyle =3D 'iso, mdy' timezone =3D 'UTC' lc_messages =3D 'en_US.UTF-8' lc_monetary =3D 'en_US.UTF-8' lc_numeric =3D 'en_US.UTF-8' lc_time =3D 'en_US.UTF-8' default_text_search_config =3D 'pg_catalog.english' deadlock_timeout =3D 2s max_files_per_process =3D 4096 effective_io_concurrency =3D 200 default_statistics_target =3D 100 # https://dba.stackexchange.com/a/280727 max_standby_streaming_delay =3D 30s Thanks! Lucas= --Apple-Mail=_05FD2864-B4B0-47B3-8339-623D8382CEC4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = guys, and happy holidays.

My /pgsql/14/main/pg_wal directory is filling up. The server = is not respecting the wal_keep_size =3D 100GB. I have no replication = slots in this server, and I have already restarted = PostgreSQL. 

I don=E2=80=99t know what else to look for. Would appreciate = any help.

My = postgresql.conf can be found below:

data_directory = =3D '/pgsql/14/main'
hba_file = =3D '/etc/postgresql/14/main/pg_hba.conf'
ident_file =3D = '/etc/postgresql/14/main/pg_ident.conf'
external_pid_file =3D = '/var/run/postgresql/14-main.pid'
unix_socket_directories =3D = '/var/run/postgresql'

# = SSL
ssl =3D = on
ssl_cert_file =3D = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
ssl_key_file =3D = '/etc/ssl/private/ssl-cert-snakeoil.key'

listen_addresses =3D '*'
port =3D 5432
random_page_cost =3D 1.1
max_connections =3D 400
shared_buffers =3D 3840MB
statement_timeout =3D 0
work_mem =3D 209719830kB
maintenance_work_mem =3D 960MB
shared_preload_libraries =3D = 'pg_stat_statements'
pg_stat_statements.track =3D all
track_activity_query_size =3D = 102400
synchronous_commit =3D = off
synchronous_standby_names = =3D '*'
wal_buffers =3D = 16MB
wal_level =3D = replica

# PG 14 new = parameters
min_wal_size =3D = 1GB
max_wal_size =3D = 4GB
max_worker_processes =3D = 2
max_parallel_workers_per_gather =3D 1
max_parallel_workers =3D 2
max_parallel_maintenance_workers =3D = 1

# Replication = parameters
max_replication_slots =3D 15
hot_standby_feedback =3D on
hot_standby =3D on
fsync =3D on
wal_keep_size =3D 100GB

restore_command =3D 'cp /data/wal_archive/%f = %p'

checkpoint_completion_target =3D 0.9
archive_mode =3D on
archive_command =3D = '/pgsql/pg-archive-wal-to-slaves.sh "%p"'
archive_timeout =3D 300
max_wal_senders =3D 50
effective_cache_size =3D 11520MB
logging_collector =3D on
log_directory =3D = '/data/postgresql/log'
log_filename =3D 'postgresql.log.%a'
log_rotation_age =3D 1440
log_rotation_size =3D 0
log_truncate_on_rotation =3D = on
log_min_duration_statement = =3D 1000
log_line_prefix =3D = '%t [%p]: [%l-1] user=3D%u,db=3D%d,app=3D%a,client=3D%h = '
log_lock_waits =3D = on
log_statement =3D = 'ddl'
log_timezone =3D = 'UTC'
stats_temp_directory =3D = '/var/run/postgresql/main.pg_stat_tmp'
autovacuum =3D on
log_autovacuum_min_duration =3D 1000
autovacuum_max_workers =3D 5
autovacuum_naptime =3D 40s
autovacuum_vacuum_threshold =3D = 200
autovacuum_analyze_threshold =3D 150
autovacuum_vacuum_scale_factor =3D = 0.02
autovacuum_analyze_scale_factor =3D 0.005
datestyle =3D 'iso, mdy'
timezone =3D 'UTC'
lc_messages =3D 'en_US.UTF-8'
lc_monetary =3D 'en_US.UTF-8'
lc_numeric =3D 'en_US.UTF-8'
lc_time =3D 'en_US.UTF-8'
default_text_search_config =3D = 'pg_catalog.english'
deadlock_timeout =3D 2s
max_files_per_process =3D 4096
effective_io_concurrency =3D 200
default_statistics_target =3D = 100

max_standby_streaming_delay =3D = 30s

Thanks!
Lucas
= --Apple-Mail=_05FD2864-B4B0-47B3-8339-623D8382CEC4--