File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,14 +31,9 @@ As well as the 'standard' postgres user you can optionally also create
3131a second (auxiliary) user with a database and optional super-user privileges
3232using the ` pg_aux ` parameters (see ` roles/postgresql/defaults/main.yaml ` ).
3333
34- ## Fine-tuning postgres with an extra configuration file
35- You can configure any additional database [ parameters] using a postgres
36- configuration file. An example is present in the root of this project
37- (` postgres-extra.conf ` ).
38-
39- If you need a file, prepare it and then name it using the playbook's
40- ` pg_extra_configuration_file ` parameter, which will be injected into the
41- postgres ** Pod** as a ** ConfigMap** and processed by postgres as it starts.
34+ ## Fine-tuning postgres with configuration
35+ You can configure any additional database [ parameters] using the playbook
36+ variable ` pg_configuration ` .
4237
4338---
4439
Original file line number Diff line number Diff line change @@ -23,3 +23,7 @@ pg_copy_vol_storageclass: efs
2323pg_aux_user : frag
2424pg_aux_user_password : blob1234
2525pg_aux_database : frag
26+
27+ pg_configuration : |
28+ listen_addresses = '*'
29+ shared_buffers = 512MB
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -53,6 +53,22 @@ pg_aux_user_is_superuser: yes
5353# What is placed here is written to the container as '/tmp/postgresql.conf',
5454# which is then copied to 'PGDATA/postgresql.conf' at run-time
5555# by our initialisation script '01-init.sh'.
56+ #
57+ # The pg_configuration can be used to set any postgres configuration
58+ # parameter: -
59+ #
60+ # pg_configuration: |
61+ # listen_addresses = '*'
62+ # autovacuum_max_workers = 2
63+ # logging_collector = true
64+ # log_min_messages = notice
65+ # max_worker_processes = 2
66+ # max_parallel_workers = 2
67+ # max_parallel_workers_per_gather = 2
68+ # max_wal_size = 1GB
69+ # shared_buffers = 128kB
70+ # synchronous_commit = off
71+ # work_mem = 4MB
5672pg_configuration : |
5773 listen_addresses = '*'
5874
Original file line number Diff line number Diff line change 1010 set -e
1111
1212 # Copy configuration into place
13- cat /tmp/postgresql.conf > /var/lib/postgresql/data /postgresql.conf
13+ cat /tmp/postgresql.conf > $PGDATA /postgresql.conf
1414
1515{% if pg_aux_user_fact %}
1616 # Configure aux user
You can’t perform that action at this time.
0 commit comments