-
Notifications
You must be signed in to change notification settings - Fork 40
/
postgresql.conf
82 lines (67 loc) · 2.64 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
70
71
72
73
74
75
76
77
78
79
80
81
82
#------------------------------------------------------------------------------
# postgresql.conf file for local development (based on a 16GB computer)
#
# !!! Don't use these settings for any transactional database use case, you will loose data
#------------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = 'localhost'
port = 5432
max_connections = 50
# - Memory -
shared_buffers = 4GB
temp_buffers = 2GB
work_mem = 512MB
maintenance_work_mem = 2GB
dynamic_shared_memory_type = posix
#------------------------------------------------------------------------------
# WRITE AHEAD LOG
#------------------------------------------------------------------------------
# - Settings -
wal_level = minimal
# needs to be set in pg11 if we set wal_level to minimal
max_wal_senders=0
fsync = off
synchronous_commit = off
full_page_writes = off
wal_buffers = 16MB
# - Checkpoints -
max_wal_size = 4GB
checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0
# - Planner Cost Constants -
seq_page_cost = 1.0 # measured on an arbitrary scale
random_page_cost = 1.5 # same scale as above
effective_cache_size = 12GB
# - Other Planner Options -
default_statistics_target = 500 # range 1-10000
#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------
logging_collector = on # Enable capturing of stderr and csvlog
log_directory = 'pg_log' # directory where log files are written,
log_filename = 'query.log' # log file name pattern,
log_min_duration_statement = 1 # -1 is disabled, 0 logs all statements
# - What to Log -
debug_print_parse = off
debug_print_rewritten = off
debug_print_plan = off
debug_pretty_print = on
log_checkpoints = off
log_connections = off
log_disconnections = off
session_preload_libraries = 'auto_explain'
auto_explain.log_analyze = on
auto_explain.log_min_duration = '2s'
auto_explain.log_nested_statements = true
auto_explain.log_verbose = true
#------------------------------------------------------------------------------
# AUTOVACUUM PARAMETERS
#------------------------------------------------------------------------------
autovacuum = on # Enable autovacuum subprocess? 'on'
autovacuum_max_workers = 1 # max number of autovacuum subprocesses
#------------------------------------------------------------------------------
# LOCK MANAGEMENT
#------------------------------------------------------------------------------
#deadlock_timeout = 1s
max_locks_per_transaction = 2048 # min 10
#load c_store extension
shared_preload_libraries = 'cstore_fdw'