postgresql icon indicating copy to clipboard operation
postgresql copied to clipboard

cluster_reset has no effect on Debian

Open eugenevd opened this issue 8 years ago • 2 comments

Hi,

On Ubuntu, my test case is:

  1. define one db for postgresql_databases - run ansible = GOOD
  2. add a 2nd db - run ansible = GOOD
  3. 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?

eugenevd avatar Jul 14 '17 14:07 eugenevd

are you still having this issue?

aoyawale avatar Apr 01 '18 14:04 aoyawale