cluster_reset has no effect on Debian
Hi,
On Ubuntu, my test case is:
- define one db for postgresql_databases - run ansible = GOOD
- add a 2nd db - run ansible = GOOD
- remove either of them = NO CHANGE
I then in vars.yml added
postgresql_cluster_reset: true(since the default is false)
Looking at configure.yml I see for the drop and create cluster tasks the following condition:
when: ansible_os_family == "Debian" and postgresql_cluster_reset and pgdata_dir_exist.changed
However, pgdata_dir_exists only changes when the data dir is dropped, which is limited to RedHat.
From my understanding pg_dropcluster + pg_createcluster is all that is needed in Ubuntu, as seems to be the configure.yml's intention, except for the limit; I reasoned I could solve the problem if for all the Debian steps I just remove that condition:
when: ansible_os_family == "Debian" and postgresql_cluster_reset
This results in this error: unable to connect to database: FATAL: could not open relation mapping file "global/pg_filenode.map
Every second run fails, every run in between succeeds. (success, fail, success, fail..)
Am I getting this wrong, or is this a bug?
are you still having this issue?