|
1 | | -## 行为、审计日志 (实时索引/实时搜索)建模 - 最佳实践 |
| 1 | +## 行为、审计日志 (实时索引/实时搜索)建模 - 最佳实践1 |
2 | 2 | |
3 | 3 | ### 作者 |
4 | 4 | digoal |
@@ -109,62 +109,63 @@ done |
109 | 109 | ``` |
110 | 110 | postgresql.auto.conf |
111 | 111 | |
112 | | -# Do not edit this file manually! |
113 | | -# It will be overwritten by the ALTER SYSTEM command. |
114 | | -listen_addresses = '0.0.0.0' |
115 | | -max_connections = 400 |
116 | | -unix_socket_directories = '.' |
117 | | -shared_buffers = 32GB |
118 | | -maintenance_work_mem = 2GB |
119 | | -dynamic_shared_memory_type = posix |
120 | | -vacuum_cost_delay = 0 |
121 | | -bgwriter_delay = 10ms |
122 | | -bgwriter_lru_maxpages = 1000 |
123 | | -bgwriter_lru_multiplier = 10.0 |
124 | | -bgwriter_flush_after = 0 |
125 | | -max_parallel_workers_per_gather = 0 |
126 | | -synchronous_commit = off |
127 | | -full_page_writes = off |
128 | | -wal_buffers = 2047MB |
129 | | -wal_writer_delay = 10ms |
130 | | -wal_writer_flush_after = 0 |
131 | | -checkpoint_timeout = 45min |
132 | | -max_wal_size = 96GB |
133 | | -min_wal_size = 32GB |
134 | | -checkpoint_completion_target = 0.9 |
135 | | -checkpoint_flush_after = 2MB |
136 | | -max_wal_senders = 0 |
137 | | -random_page_cost = 1.3 |
138 | | -effective_cache_size = 32GB |
139 | | -log_destination = 'csvlog' |
140 | | -logging_collector = on |
141 | | -log_truncate_on_rotation = on |
142 | | -log_checkpoints = on |
143 | | -log_connections = on |
144 | | -log_disconnections = on |
145 | | -log_error_verbosity = verbose |
146 | | -log_timezone = 'PRC' |
147 | | -autovacuum = on |
148 | | -log_autovacuum_min_duration = 0 |
149 | | -autovacuum_freeze_max_age = 1500000000 |
150 | | -autovacuum_multixact_freeze_max_age = 1600000000 |
151 | | -vacuum_freeze_table_age = 1400000000 |
152 | | -vacuum_multixact_freeze_table_age = 1400000000 |
153 | | -datestyle = 'iso, mdy' |
154 | | -timezone = 'PRC' |
155 | | -lc_messages = 'C' |
156 | | -lc_monetary = 'C' |
157 | | -lc_numeric = 'C' |
158 | | -lc_time = 'C' |
159 | | -default_text_search_config = 'pg_catalog.english' |
160 | | -autovacuum_work_mem = 2GB |
161 | | -autovacuum_max_workers = 12 |
162 | | -autovacuum_naptime = 30s |
163 | | -autovacuum_vacuum_scale_factor = 0.2 |
164 | | -autovacuum_analyze_scale_factor = 0.2 |
165 | | -autovacuum_vacuum_cost_delay = 0 |
166 | | -autovacuum_vacuum_cost_limit = 0 |
167 | | -zero_damaged_pages = on |
| 112 | +# Do not edit this file manually! |
| 113 | +# It will be overwritten by the ALTER SYSTEM command. |
| 114 | +listen_addresses = '0.0.0.0' |
| 115 | +max_connections = 400 |
| 116 | +unix_socket_directories = '.' |
| 117 | +shared_buffers = 32GB |
| 118 | +maintenance_work_mem = 2GB |
| 119 | +dynamic_shared_memory_type = posix |
| 120 | +vacuum_cost_delay = 0 |
| 121 | +bgwriter_delay = 10ms |
| 122 | +bgwriter_lru_maxpages = 1000 |
| 123 | +bgwriter_lru_multiplier = 10.0 |
| 124 | +bgwriter_flush_after = 0 |
| 125 | +max_parallel_workers_per_gather = 0 |
| 126 | +fsync=on |
| 127 | +synchronous_commit = off |
| 128 | +full_page_writes = off |
| 129 | +wal_buffers = 64MB |
| 130 | +wal_writer_delay = 10ms |
| 131 | +wal_writer_flush_after = 0 |
| 132 | +checkpoint_timeout = 5min |
| 133 | +max_wal_size = 64GB |
| 134 | +min_wal_size = 16GB |
| 135 | +checkpoint_completion_target = 0.1 |
| 136 | +checkpoint_flush_after = 128kB |
| 137 | +max_wal_senders = 0 |
| 138 | +random_page_cost = 1.5 |
| 139 | +effective_cache_size = 48GB |
| 140 | +log_destination = 'csvlog' |
| 141 | +logging_collector = on |
| 142 | +log_truncate_on_rotation = on |
| 143 | +log_checkpoints = on |
| 144 | +log_connections = on |
| 145 | +log_disconnections = on |
| 146 | +log_error_verbosity = verbose |
| 147 | +log_timezone = 'PRC' |
| 148 | +autovacuum = on |
| 149 | +log_autovacuum_min_duration = 0 |
| 150 | +autovacuum_freeze_max_age = 1500000000 |
| 151 | +autovacuum_multixact_freeze_max_age = 1600000000 |
| 152 | +vacuum_freeze_table_age = 1400000000 |
| 153 | +vacuum_multixact_freeze_table_age = 1400000000 |
| 154 | +datestyle = 'iso, mdy' |
| 155 | +timezone = 'PRC' |
| 156 | +lc_messages = 'C' |
| 157 | +lc_monetary = 'C' |
| 158 | +lc_numeric = 'C' |
| 159 | +lc_time = 'C' |
| 160 | +default_text_search_config = 'pg_catalog.english' |
| 161 | +autovacuum_work_mem = 2GB |
| 162 | +autovacuum_max_workers = 12 |
| 163 | +autovacuum_naptime = 20s |
| 164 | +autovacuum_vacuum_scale_factor = 0.2 |
| 165 | +autovacuum_analyze_scale_factor = 0.2 |
| 166 | +autovacuum_vacuum_cost_delay = 0 |
| 167 | +autovacuum_vacuum_cost_limit = 0 |
| 168 | +zero_damaged_pages = on |
168 | 169 | ``` |
169 | 170 | |
170 | 171 | ``` |
|
0 commit comments