I upgraded the PostgreSQL database from version 10 to 11. As I tried to access the database from a client pgadmin4 console, I got the below error:
I checked the two file postgresql.conf and pg_hba.conf in the system. However, when I tried to open the pg_hba.conf file, it comes up blank. I followed the steps for the upgrade (for Ubuntu users)in the link below:
I know this error might get resolved if I allow privileges in the pg_hba.conf file. But that file does not show any data in it. I am a beginner in setting up database servers and could have unknowingly skipped something which I cannot figure out. Can anyone please help me with this?
Adding the image for pg_hba.conf file:
Best Answer
Upgrading a database with either dump/restore or
pg_upgrade
will not copy the configuration files, so you are left with whateverpg_hba.conf
was there right afterinitdb
created the new cluster.You have to edit and adapt
postgresql.conf
andpg_hba.conf
and other configuration files you use manually on the new cluster. Withpg_hba.conf
copying the file over is usually good enough, butpostgresql.conf
requires more attention.