File tree Expand file tree Collapse file tree 8 files changed +16
-3
lines changed
Expand file tree Collapse file tree 8 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ 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 /etc/postgresql-custom/read-replica.conf
217218COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
218219COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
219220
Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ 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 /etc/postgresql-custom/read-replica.conf
221222COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
222223COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
223224
Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ 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 /etc/postgresql-custom/read-replica.conf
221222COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
222223COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
223224
File renamed without changes.
Original file line number Diff line number Diff line change @@ -752,6 +752,9 @@ jit_provider = 'llvmjit' # JIT library to use
752752#include_if_exists = '...' # include file only if it exists
753753#include = '...' # include file
754754
755+ # read replica specific configurations
756+ include = '/etc/postgresql-custom/read-replica.conf'
757+
755758# supautils specific configurations
756759#include = '/etc/postgresql-custom/supautils.conf'
757760
Original file line number Diff line number Diff line change 167167 loop_control :
168168 loop_var : ' pg_config_item'
169169
170- - name : Move read-replica.conf file to /etc/postgresql-custom/conf.d/ read-replica.conf
170+ - name : Move read-replica.conf file to /etc/postgresql-custom/read-replica.conf
171171 ansible.builtin.copy :
172- dest : ' /etc/postgresql-custom/conf.d/read_replica .conf'
172+ dest : ' /etc/postgresql-custom/read-replica .conf'
173173 mode : ' 0664'
174174 owner : ' postgres'
175175 group : ' postgres'
176- src : ' files/postgresql_config/conf.d/read_replica .conf'
176+ src : ' files/postgresql_config/custom_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 ;
54+ } ;
5155 pgHbaConfigFile = builtins . path {
5256 name = "pg_hba.conf" ;
5357 path = ../../ansible/files/postgresql_config/pg_hba.conf.j2 ;
8791 POSTGRESQL_CONFIG_DIR = "${ postgresqlConfigBaseDir } " ;
8892 PSQLORIOLEDB17_BINDIR = "${ psql_orioledb-17 } " ;
8993 PGSODIUM_GETKEY = "${ paths . getkeyScript } " ;
94+ READREPL_CONF_FILE = "${ paths . readReplicaConfigFile } " ;
9095 LOGGING_CONF_FILE = "${ paths . loggingConfigFile } " ;
9196 SUPAUTILS_CONF_FILE = "${ paths . supautilsConfigFile } " ;
9297 PG_HBA = "${ paths . pgHbaConfigFile } " ;
118123 cp ${ paths . supautilsConfigFile } $out/etc/postgresql-custom/supautils.conf || { echo "Failed to copy supautils.conf"; exit 1; }
119124 cp ${ paths . pgconfigFile } $out/etc/postgresql/postgresql.conf || { echo "Failed to copy postgresql.conf"; exit 1; }
120125 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; }
121127 cp ${ paths . pgHbaConfigFile } $out/etc/postgresql/pg_hba.conf || { echo "Failed to copy pg_hba.conf"; exit 1; }
122128 cp ${ paths . pgIdentConfigFile } $out/etc/postgresql/pg_ident.conf || { echo "Failed to copy pg_ident.conf"; exit 1; }
123129 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,6 +240,7 @@ 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'|" \
243244-e " \$ a\\
244245session_preload_libraries = 'supautils'" \
245246-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