postgresql icon indicating copy to clipboard operation
postgresql copied to clipboard

During database crash, RedHat can't find pg_ident.conf

Open gclough opened this issue 6 years ago • 2 comments

If the database crashes, then during crash recovery it looks for pg_ident.conf... and fails:

2018-03-20 15:07:25 UTC [11965]: [3-1] user=,db=,app=,client= LOG:  could not open usermap file "/etc/postgresql/9.6/data/pg_ident.conf": No such file or directory
2018-03-20 15:07:25 UTC [11967]: [1-1] user=,db=,app=,client= LOG:  database system was interrupted while in recovery at 2018-03-20 15:05:24 UTC
2018-03-20 15:07:25 UTC [11967]: [2-1] user=,db=,app=,client= HINT:  This probably means that some data is corrupted and you will have to use the last backup for recovery.

By default on RedHat/CentOS this should be in $PGDATA, but because of the "Ubuntu" layout this file is expected to be in /etc/postgresql/{{ postgresql_version }}/data:

ident_file = '/etc/postgresql/9.6/data/pg_ident.conf' # ident configuration file

... but it's currently in $PGDATA/pg_ident.conf

Personally I'd prefer to see this playbook configure more of a "RedHat" layout, which means putting everything into $PGDATA, and not scattering things into /etc/postgresql...

gclough avatar Mar 20 '18 15:03 gclough

agreed. will have to make a change somewhere were each distro can have their default location.

aoyawale avatar Mar 30 '18 05:03 aoyawale

This should get fixed by #288, but will likely need a lot of merging due to the recent changes. I'll see what I can sort out.

gclough avatar Apr 03 '18 23:04 gclough