Skip to content

Commit ccd0bc9

Browse files
committed
custom WAL location: include custom_wal_dir tasks in playbook add_pgnode.yml
Make sure pg_xlog/pg_wal is symlink. If custom path to WAL directory is specified in "postgresql_wal_dir" variable. Execution of custom_wal_dir tasks is safe when scaling the cluster, since "add_pgnode.yml" playbook runs this tasks only on nodes added to the "replica" group. https://github.com/vitabaks/postgresql_cluster#cluster-scaling
1 parent 3128767 commit ccd0bc9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

roles/patroni/tasks/main.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,7 @@
904904

905905
# create symlink pg_xlog/pg_wal to custom WAL dir
906906
- import_tasks: custom_wal_dir.yml
907-
when: (postgresql_wal_dir is defined and postgresql_wal_dir | length > 0) and
908-
(existing_pgcluster is not defined or not existing_pgcluster|bool) # exclude playbook add_pgnode.yml
907+
when: postgresql_wal_dir is defined and postgresql_wal_dir | length > 0
909908
tags: patroni, custom_wal_dir
910909

911910
# disable postgresql from autostart

0 commit comments

Comments
 (0)