-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathpostgresql.conf
69 lines (54 loc) · 2.61 KB
/
postgresql.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
listen_addresses = '*'
max_connections = 500
#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------
dynamic_shared_memory_type = posix
# effective_io_concurrency = 100 # Same as max_connections
work_mem = 8MB # ~0.05% of 200MB RAM
maintenance_work_mem = 16MB # work_mem * 2
#------------------------------------------------------------------------------
# WRITE-AHEAD LOG
#------------------------------------------------------------------------------
shared_buffers = 50MB # 25% of 200MB RAM
wal_buffers = 64MB # ~30% of 200MB RAM
max_wal_size = 100MB # 50% of 200MB RAM
min_wal_size = 32MB # wal_segment_size(16MB) * 2 - ~30% of 200MB RAM
checkpoint_timeout = 10min # range 30s-1d
synchronous_commit = off
fsync = off
full_page_writes = off
#------------------------------------------------------------------------------
# QUERY TUNING
#------------------------------------------------------------------------------
effective_cache_size = 140MB # 70% of 200MB RAM
# A higher random_page_cost makes the planner more likely to choose sequential scans,
# while a lower random_page_cost makes it more likely to choose index scans.
# default = 4
random_page_cost = 2
#------------------------------------------------------------------------------
# AUTOVACUUM
#------------------------------------------------------------------------------
autovacuum = on
#------------------------------------------------------------------------------
# REPORTING AND LOGGING
#------------------------------------------------------------------------------
log_timezone = 'Etc/UTC'
log_statement = 'none'
log_duration = off
log_lock_waits = off
log_error_verbosity = terse
log_min_messages = panic # lowest details in log
log_min_error_statement = panic # disable log
#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#------------------------------------------------------------------------------
datestyle = 'iso, mdy'
lc_messages = 'en_US.utf8' # locale for system error message
lc_monetary = 'en_US.utf8' # locale for monetary formatting
lc_numeric = 'en_US.utf8' # locale for number formatting
lc_time = 'en_US.utf8' # locale for time formatting
default_text_search_config = 'pg_catalog.english'