File tree Expand file tree Collapse file tree 8 files changed +7
-19
lines changed
Expand file tree Collapse file tree 8 files changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,6 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout
214214COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf
215215COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts
216216COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh
217- COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf
218217COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf
219218COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
220219COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
Original file line number Diff line number Diff line change @@ -218,7 +218,6 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout
218218COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf
219219COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts
220220COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh
221- COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf
222221COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf
223222COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
224223COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
Original file line number Diff line number Diff line change @@ -218,7 +218,6 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout
218218COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf
219219COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts
220220COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh
221- COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf
222221COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf
223222COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
224223COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
Original file line number Diff line number Diff line change 11# hot_standby = on
2- # restore_command = '/usr/bin/admin-mgr wal-fetch %f %p >> /var/log/wal-g/wal-fetch.log 2>&1'
3- # recovery_target_timeline = 'latest'
42
53# primary_conninfo = 'host=localhost port=6543 user=replication'
4+
5+ # restore_command = '/usr/bin/admin-mgr wal-fetch %f %p >> /var/log/wal-g/wal-fetch.log 2>&1'
6+ # recovery_target_timeline = 'latest'
Original file line number Diff line number Diff line change @@ -761,9 +761,6 @@ jit_provider = 'llvmjit' # JIT library to use
761761# WAL-G specific configurations
762762#include = '/etc/postgresql-custom/wal-g.conf'
763763
764- # read replica specific configurations
765- include = '/etc/postgresql-custom/read-replica.conf'
766-
767764# supautils specific configurations
768765#include = '/etc/postgresql-custom/supautils.conf'
769766
Original file line number Diff line number Diff line change 167167 loop_control :
168168 loop_var : ' pg_config_item'
169169
170- - name : Move custom read-replica.conf file to /etc/postgresql-custom/read-replica.conf
171- ansible.builtin.template :
172- dest : ' /etc/postgresql-custom/read-replica .conf'
170+ - name : Move read-replica.conf file to /etc/postgresql-custom/conf.d /read-replica.conf
171+ ansible.builtin.copy :
172+ dest : ' /etc/postgresql-custom/conf.d/read_replica .conf'
173173 mode : ' 0664'
174174 owner : ' postgres'
175175 group : ' postgres'
176- src : ' files/postgresql_config/custom_read_replica. conf.j2 '
176+ src : ' files/postgresql_config/conf.d/read_replica.conf '
177177
178178# Install extensions before init
179179- name : Install Postgres extensions
Original file line number Diff line number Diff line change 4848 name = "logging.conf" ;
4949 path = ../../ansible/files/postgresql_config/postgresql-csvlog.conf ;
5050 } ;
51- readReplicaConfigFile = builtins . path {
52- name = "readreplica.conf" ;
53- path = ../../ansible/files/postgresql_config/custom_read_replica.conf.j2 ;
54- } ;
5551 pgHbaConfigFile = builtins . path {
5652 name = "pg_hba.conf" ;
5753 path = ../../ansible/files/postgresql_config/pg_hba.conf.j2 ;
9187 POSTGRESQL_CONFIG_DIR = "${ postgresqlConfigBaseDir } " ;
9288 PSQLORIOLEDB17_BINDIR = "${ psql_orioledb-17 } " ;
9389 PGSODIUM_GETKEY = "${ paths . getkeyScript } " ;
94- READREPL_CONF_FILE = "${ paths . readReplicaConfigFile } " ;
9590 LOGGING_CONF_FILE = "${ paths . loggingConfigFile } " ;
9691 SUPAUTILS_CONF_FILE = "${ paths . supautilsConfigFile } " ;
9792 PG_HBA = "${ paths . pgHbaConfigFile } " ;
123118 cp ${ paths . supautilsConfigFile } $out/etc/postgresql-custom/supautils.conf || { echo "Failed to copy supautils.conf"; exit 1; }
124119 cp ${ paths . pgconfigFile } $out/etc/postgresql/postgresql.conf || { echo "Failed to copy postgresql.conf"; exit 1; }
125120 cp ${ paths . loggingConfigFile } $out/etc/postgresql-custom/logging.conf || { echo "Failed to copy logging.conf"; exit 1; }
126- cp ${ paths . readReplicaConfigFile } $out/etc/postgresql-custom/read-replica.conf || { echo "Failed to copy read-replica.conf"; exit 1; }
127121 cp ${ paths . pgHbaConfigFile } $out/etc/postgresql/pg_hba.conf || { echo "Failed to copy pg_hba.conf"; exit 1; }
128122 cp ${ paths . pgIdentConfigFile } $out/etc/postgresql/pg_ident.conf || { echo "Failed to copy pg_ident.conf"; exit 1; }
129123 cp -r ${ paths . postgresqlExtensionCustomScriptsPath } /* $out/extension-custom-scripts/ || { echo "Failed to copy custom scripts"; exit 1; }
Original file line number Diff line number Diff line change @@ -240,7 +240,6 @@ vault.getkey_script = '$PGSODIUM_GETKEY_SCRIPT'" \
240240-e " s|hba_file = '/etc/postgresql/pg_hba.conf'|hba_file = '$DATDIR /pg_hba.conf'|" \
241241-e " s|ident_file = '/etc/postgresql/pg_ident.conf'|ident_file = '$DATDIR /pg_ident.conf'|" \
242242-e " s|include = '/etc/postgresql/logging.conf'|#&|" \
243- -e " s|include = '/etc/postgresql-custom/read-replica.conf'|include = '$DATDIR /read-replica.conf'|" \
244243-e " \$ a\\
245244session_preload_libraries = 'supautils'" \
246245-e " s|include_dir = '/etc/postgresql-custom/conf.d'|include_dir = '$DATDIR /conf.d'|" \
You can’t perform that action at this time.
0 commit comments