1- --- postgresql.conf.sample 2024-05-06 22:21:25 .000000000 +0200
2- +++ postgresql.conf.cfengine 2024-05-13 12:01:40.245952132 +0200
1+ --- postgresql.conf.sample 2025-09-22 22:11:33 .000000000 +0200
2+ +++ postgresql.conf.cfengine 2025-09-29 13:55:49.811053962 +0200
33@@ -1,6 +1,6 @@
44- # -----------------------------
55- # PostgreSQL configuration file
1111 # This file consists of lines of the form:
1212 #
1313@@ -62,13 +62,15 @@
14- # defaults to 'localhost'; use '*' for all
15- # (change requires restart)
16- #port = 5432 # (change requires restart)
17- - #max_connections = 100 # (change requires restart)
18- + max_connections = 300 # (change requires restart)
14+ # defaults to 'localhost'; use '*' for all
15+ # (change requires restart)
16+ #port = 5432 # (change requires restart)
17+ - #max_connections = 100 # (change requires restart)
18+ + max_connections = 300 # (change requires restart)
1919+ # Note: Increasing max_connections costs ~400 bytes of shared memory per
2020+ # connection slot, plus lock space (see max_locks_per_transaction).
21- #reserved_connections = 0 # (change requires restart)
22- #superuser_reserved_connections = 3 # (change requires restart)
23- #unix_socket_directories = '/tmp' # comma-separated list of directories
24- # (change requires restart)
25- - #unix_socket_group = '' # (change requires restart)
26- - #unix_socket_permissions = 0777 # begin with 0 to use octal notation
27- + unix_socket_group = 'cfpostgres' # (change requires restart)
28- + unix_socket_permissions = 0660 # begin with 0 to use octal notation
29- # (change requires restart)
30- #bonjour = off # advertise server via Bonjour
31- # (change requires restart)
32- @@ -127 ,7 +129 ,7 @@
33-
21+ #reserved_connections = 0 # (change requires restart)
22+ #superuser_reserved_connections = 3 # (change requires restart)
23+ #unix_socket_directories = '/tmp' # comma-separated list of directories
24+ # (change requires restart)
25+ - #unix_socket_group = '' # (change requires restart)
26+ - #unix_socket_permissions = 0777 # begin with 0 to use octal notation
27+ + unix_socket_group = 'cfpostgres' # (change requires restart)
28+ + unix_socket_permissions = 0660 # begin with 0 to use octal notation
29+ # (change requires restart)
30+ #bonjour = off # advertise server via Bonjour
31+ # (change requires restart)
32+ @@ -129 ,7 +131 ,7 @@
33+
3434 # - Memory -
35-
36- - #shared_buffers = 128MB # min 128kB
37- + shared_buffers = 2GB # min 128kB
38- # (change requires restart)
39- #huge_pages = try # on, off, or try
40- # (change requires restart)
41- @@ -138 ,12 +140 ,17 @@
42- # (change requires restart)
35+
36+ - #shared_buffers = 128MB # min 128kB
37+ + shared_buffers = 2GB # min 128kB
38+ # (change requires restart)
39+ #huge_pages = try # on, off, or try
40+ # (change requires restart)
41+ @@ -140 ,12 +142 ,17 @@
42+ # (change requires restart)
4343 # Caution: it is not advisable to set max_prepared_transactions nonzero unless
4444 # you actively intend to use prepared transactions.
45- - #work_mem = 4MB # min 64kB
45+ - #work_mem = 4MB # min 64kB
4646+
4747+ # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
4848+ # per transaction slot, plus lock space (see max_locks_per_transaction).
4949+ # It is not advisable to set max_prepared_transactions nonzero unless you
5050+ # actively intend to use prepared transactions.
51- + work_mem = 48MB # min 64kB
52- #hash_mem_multiplier = 2.0 # 1-1000.0 multiplier on hash table work_mem
53- - #maintenance_work_mem = 64MB # min 64kB
54- + maintenance_work_mem = 512MB # min 64kB
55- #autovacuum_work_mem = -1 # min 64kB, or -1 to use maintenance_work_mem
56- - #logical_decoding_work_mem = 64MB # min 64kB
57- - #max_stack_depth = 2MB # min 100kB
58- + #logical_decoding_work_mem = 128MB # min 64kB
59- + max_stack_depth = 4MB # min 100kB
60- #shared_memory_type = mmap # the default is the first option
61- # supported by the operating system:
62- # mmap
63- @@ -213 ,7 +220 ,7 @@
64- #fsync = on # flush data to disk for crash safety
65- # (turning this off can cause
66- # unrecoverable data corruption)
67- - #synchronous_commit = on # synchronization level;
68- + synchronous_commit = off # synchronization level;
69- # off, local, remote_write, remote_apply, or on
70- #wal_sync_method = fsync # the default is the first option
71- # supported by the operating system:
72- @@ -240 ,11 +247 ,11 @@
73-
51+ + work_mem = 48MB # min 64kB
52+ #hash_mem_multiplier = 2.0 # 1-1000.0 multiplier on hash table work_mem
53+ - #maintenance_work_mem = 64MB # min 64kB
54+ + maintenance_work_mem = 512MB # min 64kB
55+ #autovacuum_work_mem = -1 # min 64kB, or -1 to use maintenance_work_mem
56+ - #logical_decoding_work_mem = 64MB # min 64kB
57+ - #max_stack_depth = 2MB # min 100kB
58+ + #logical_decoding_work_mem = 128MB # min 64kB
59+ + max_stack_depth = 4MB # min 100kB
60+ #shared_memory_type = mmap # the default is the first option
61+ # supported by the operating system:
62+ # mmap
63+ @@ -233 ,7 +240 ,7 @@
64+ #fsync = on # flush data to disk for crash safety
65+ # (turning this off can cause
66+ # unrecoverable data corruption)
67+ - #synchronous_commit = on # synchronization level;
68+ + synchronous_commit = off # synchronization level;
69+ # off, local, remote_write, remote_apply, or on
70+ #wal_sync_method = fsync # the default is the first option
71+ # supported by the operating system:
72+ @@ -260 ,11 +267 ,11 @@
73+
7474 # - Checkpoints -
75-
76- - #checkpoint_timeout = 5min # range 30s-1d
77- + checkpoint_timeout = 15min # range 30s-1d
78- #checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0
79- #checkpoint_flush_after = 0 # measured in pages, 0 disables
80- #checkpoint_warning = 30s # 0 disables
75+
76+ - #checkpoint_timeout = 5min # range 30s-1d
77+ + checkpoint_timeout = 15min # range 30s-1d
78+ #checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0
79+ #checkpoint_flush_after = 0 # measured in pages, 0 disables
80+ #checkpoint_warning = 30s # 0 disables
8181- #max_wal_size = 1GB
8282+ max_wal_size = 4GB
8383 #min_wal_size = 80MB
84-
84+
8585 # - Prefetching during recovery -
86- @@ -562 ,7 +569 ,7 @@
87- #log_duration = off
88- #log_error_verbosity = default # terse, default, or verbose messages
86+ @@ -598 ,7 +605 ,7 @@
87+ #log_duration = off # log statement duration
88+ #log_error_verbosity = default # terse, default, or verbose messages
8989 #log_hostname = off
90- - #log_line_prefix = '%m [%p] ' # special values:
91- + log_line_prefix = '%t ' # special values:
92- # %a = application name
93- # %u = user name
94- # %d = database name
95- @@ -639 ,7 +646 ,7 @@
96-
97- #autovacuum = on # Enable autovacuum subprocess? 'on'
98- # requires track_counts to also be on.
99- - #autovacuum_max_workers = 3 # max number of autovacuum subprocesses
100- + autovacuum_max_workers = 5 # max number of autovacuum subprocesses
101- # (change requires restart)
102- #autovacuum_naptime = 1min # time between autovacuum runs
103- #autovacuum_vacuum_threshold = 50 # min number of row updates before
104- @@ -649 ,7 +656 ,7 @@
105- # vacuums
106- #autovacuum_analyze_threshold = 50 # min number of row updates before
107- # analyze
108- - #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
109- + autovacuum_vacuum_scale_factor = 0.1 # fraction of table size before vacuum
110- #autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table
111- # size before insert vacuum
112- #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
113- @@ -757 ,6 +764 ,10 @@
90+ - #log_line_prefix = '%m [%p] ' # special values:
91+ + log_line_prefix = '%t ' # special values:
92+ # %a = application name
93+ # %u = user name
94+ # %d = database name
95+ @@ -682 ,7 +689 ,7 @@
96+ # requires track_counts to also be on.
97+ autovacuum_worker_slots = 16 # autovacuum worker slots to allocate
98+ # (change requires restart)
99+ - #autovacuum_max_workers = 3 # max number of autovacuum subprocesses
100+ + autovacuum_max_workers = 5 # max number of autovacuum subprocesses
101+ #autovacuum_naptime = 1min # time between autovacuum runs
102+ #autovacuum_vacuum_threshold = 50 # min number of row updates before
103+ # vacuum
104+ @@ -691 ,7 +698 ,7 @@
105+ # vacuums
106+ #autovacuum_analyze_threshold = 50 # min number of row updates before
107+ # analyze
108+ - #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
109+ + autovacuum_vacuum_scale_factor = 0.1 # fraction of table size before vacuum
110+ #autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of unfrozen pages
111+ # before insert vacuum
112+ #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
113+ @@ -820 ,6 +827 ,10 @@
114114 # LOCK MANAGEMENT
115115 #------------------------------------------------------------------------------
116-
116+
117117+ # Note: Each lock table slot uses ~270 bytes of shared memory, and there are
118118+ # max_locks_per_transaction * (max_connections + max_prepared_transactions)
119119+ # lock table slots.
120120+
121121 #deadlock_timeout = 1s
122- #max_locks_per_transaction = 64 # min 10
123- # (change requires restart)
122+ #max_locks_per_transaction = 64 # min 10
123+ # (change requires restart)
0 commit comments