PostgreSQL – How to Recover a Deleted pg_hba.conf File on Linux

linuxpostgresql

If anyone delete the pg_hba.conf file, and don't run "pg_ctl reload", the configuration of the deleted file is still working.
With that in mind, could someone put in a new file that info wherever it is?

Best Answer

If you are using Postgres 10, then this is possible through the view pg_hba_file_rules

For earlier versions, I am not aware of any way to retrieve that.