Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile-15
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout
COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf
COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts
COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf
COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
Expand Down
1 change: 0 additions & 1 deletion Dockerfile-17
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout
COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf
COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts
COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf
COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
Expand Down
1 change: 0 additions & 1 deletion Dockerfile-orioledb-17
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout
COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf
COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts
COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf
COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf
COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# hot_standby = on
# restore_command = '/usr/bin/admin-mgr wal-fetch %f %p >> /var/log/wal-g/wal-fetch.log 2>&1'
# recovery_target_timeline = 'latest'

# primary_conninfo = 'host=localhost port=6543 user=replication'

# restore_command = '/usr/bin/admin-mgr wal-fetch %f %p >> /var/log/wal-g/wal-fetch.log 2>&1'
# recovery_target_timeline = 'latest'
3 changes: 0 additions & 3 deletions ansible/files/postgresql_config/postgresql.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,6 @@ jit_provider = 'llvmjit' # JIT library to use
# WAL-G specific configurations
#include = '/etc/postgresql-custom/wal-g.conf'

# read replica specific configurations
include = '/etc/postgresql-custom/read-replica.conf'

# supautils specific configurations
#include = '/etc/postgresql-custom/supautils.conf'

Expand Down
8 changes: 4 additions & 4 deletions ansible/tasks/setup-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@
loop_control:
loop_var: 'pg_config_item'

- name: Move custom read-replica.conf file to /etc/postgresql-custom/read-replica.conf
ansible.builtin.template:
dest: '/etc/postgresql-custom/read-replica.conf'
- name: Move read-replica.conf file to /etc/postgresql-custom/conf.d/read-replica.conf
ansible.builtin.copy:
dest: '/etc/postgresql-custom/conf.d/read_replica.conf'
mode: '0664'
owner: 'postgres'
group: 'postgres'
src: 'files/postgresql_config/custom_read_replica.conf.j2'
src: 'files/postgresql_config/conf.d/read_replica.conf'

# Install extensions before init
- name: Install Postgres extensions
Expand Down
6 changes: 0 additions & 6 deletions nix/packages/lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@
name = "logging.conf";
path = ../../ansible/files/postgresql_config/postgresql-csvlog.conf;
};
readReplicaConfigFile = builtins.path {
name = "readreplica.conf";
path = ../../ansible/files/postgresql_config/custom_read_replica.conf.j2;
};
pgHbaConfigFile = builtins.path {
name = "pg_hba.conf";
path = ../../ansible/files/postgresql_config/pg_hba.conf.j2;
Expand Down Expand Up @@ -91,7 +87,6 @@
POSTGRESQL_CONFIG_DIR = "${postgresqlConfigBaseDir}";
PSQLORIOLEDB17_BINDIR = "${psql_orioledb-17}";
PGSODIUM_GETKEY = "${paths.getkeyScript}";
READREPL_CONF_FILE = "${paths.readReplicaConfigFile}";
LOGGING_CONF_FILE = "${paths.loggingConfigFile}";
SUPAUTILS_CONF_FILE = "${paths.supautilsConfigFile}";
PG_HBA = "${paths.pgHbaConfigFile}";
Expand Down Expand Up @@ -123,7 +118,6 @@
cp ${paths.supautilsConfigFile} $out/etc/postgresql-custom/supautils.conf || { echo "Failed to copy supautils.conf"; exit 1; }
cp ${paths.pgconfigFile} $out/etc/postgresql/postgresql.conf || { echo "Failed to copy postgresql.conf"; exit 1; }
cp ${paths.loggingConfigFile} $out/etc/postgresql-custom/logging.conf || { echo "Failed to copy logging.conf"; exit 1; }
cp ${paths.readReplicaConfigFile} $out/etc/postgresql-custom/read-replica.conf || { echo "Failed to copy read-replica.conf"; exit 1; }
cp ${paths.pgHbaConfigFile} $out/etc/postgresql/pg_hba.conf || { echo "Failed to copy pg_hba.conf"; exit 1; }
cp ${paths.pgIdentConfigFile} $out/etc/postgresql/pg_ident.conf || { echo "Failed to copy pg_ident.conf"; exit 1; }
cp -r ${paths.postgresqlExtensionCustomScriptsPath}/* $out/extension-custom-scripts/ || { echo "Failed to copy custom scripts"; exit 1; }
Expand Down
1 change: 0 additions & 1 deletion nix/tools/run-server.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ vault.getkey_script = '$PGSODIUM_GETKEY_SCRIPT'" \
-e "s|hba_file = '/etc/postgresql/pg_hba.conf'|hba_file = '$DATDIR/pg_hba.conf'|" \
-e "s|ident_file = '/etc/postgresql/pg_ident.conf'|ident_file = '$DATDIR/pg_ident.conf'|" \
-e "s|include = '/etc/postgresql/logging.conf'|#&|" \
-e "s|include = '/etc/postgresql-custom/read-replica.conf'|include = '$DATDIR/read-replica.conf'|" \
-e "\$a\\
session_preload_libraries = 'supautils'" \
-e "s|include_dir = '/etc/postgresql-custom/conf.d'|include_dir = '$DATDIR/conf.d'|" \
Expand Down