postgres
This commit is contained in:
parent
54c60fc9b7
commit
88b706914f
8 changed files with 84 additions and 0 deletions
0
postgres/conf.d/.gitkeep
Normal file
0
postgres/conf.d/.gitkeep
Normal file
0
postgres/environment
Normal file
0
postgres/environment
Normal file
1
postgres/pg_ctl.conf
Normal file
1
postgres/pg_ctl.conf
Normal file
|
|
@ -0,0 +1 @@
|
|||
pg_ctl_options = ''
|
||||
4
postgres/pg_hba.conf
Normal file
4
postgres/pg_hba.conf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
# Database administrative login by Unix domain socket, do not disable
|
||||
local all postgres peer
|
||||
local all all peer
|
||||
0
postgres/pg_ident.conf
Normal file
0
postgres/pg_ident.conf
Normal file
60
postgres/postgresql.conf
Normal file
60
postgres/postgresql.conf
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
data_directory = '/var/lib/postgresql/17/events'
|
||||
hba_file = '/etc/postgresql/17/events/pg_hba.conf'
|
||||
ident_file = '/etc/postgresql/17/events/pg_ident.conf'
|
||||
external_pid_file = '/var/run/postgresql/17-events.pid'
|
||||
|
||||
listen_addresses = ''
|
||||
port = 5433
|
||||
max_connections = 100
|
||||
unix_socket_directories = '/var/run/postgresql'
|
||||
unix_socket_permissions = 0777
|
||||
|
||||
ssl = off
|
||||
|
||||
dynamic_shared_memory_type = posix
|
||||
|
||||
log_rotation_age = 7d
|
||||
log_rotation_size = 0
|
||||
log_line_prefix = '%m [%p] %q%u@%d '
|
||||
log_timezone = 'Europe/Berlin'
|
||||
timezone = 'Europe/Berlin'
|
||||
cluster_name = '17/events'
|
||||
datestyle = 'iso'
|
||||
lc_messages = 'C.UTF-8'
|
||||
lc_monetary = 'C.UTF-8'
|
||||
lc_numeric = 'C.UTF-8'
|
||||
lc_time = 'C.UTF-8'
|
||||
|
||||
default_text_search_config = 'pg_catalog.english'
|
||||
|
||||
include_dir = 'conf.d'
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tuning config from https://pgtune.leopard.in.ua
|
||||
|
||||
# DB Version: 17
|
||||
# OS Type: linux
|
||||
# DB Type: web
|
||||
# Total Memory (RAM): 2 GB
|
||||
# CPUs num: 4
|
||||
# Connections num: 100
|
||||
# Data Storage: ssd
|
||||
|
||||
max_connections = 100
|
||||
shared_buffers = 512MB
|
||||
effective_cache_size = 1536MB
|
||||
maintenance_work_mem = 128MB
|
||||
checkpoint_completion_target = 0.9
|
||||
wal_buffers = 16MB
|
||||
default_statistics_target = 100
|
||||
random_page_cost = 1.1
|
||||
effective_io_concurrency = 200
|
||||
work_mem = 5041kB
|
||||
huge_pages = off
|
||||
min_wal_size = 1GB
|
||||
max_wal_size = 4GB
|
||||
max_worker_processes = 4
|
||||
max_parallel_workers_per_gather = 2
|
||||
max_parallel_workers = 4
|
||||
max_parallel_maintenance_workers = 2
|
||||
|
||||
1
postgres/start.conf
Normal file
1
postgres/start.conf
Normal file
|
|
@ -0,0 +1 @@
|
|||
auto
|
||||
18
postgresql.service
Normal file
18
postgresql.service
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# postgresql.service is the meta unit for managing all PostgreSQL clusters on
|
||||
# the system at once. Conceptually, this unit is more like a systemd target,
|
||||
# but we are using a service since targets cannot be reloaded.
|
||||
#
|
||||
# The unit actually managing PostgreSQL clusters is postgresql@.service,
|
||||
# instantiated as postgresql@15-main.service for individual clusters.
|
||||
|
||||
[Unit]
|
||||
Description=PostgreSQL RDBMS
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/true
|
||||
ExecReload=/bin/true
|
||||
RemainAfterExit=on
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue