It's happened to all of us. We're faced with a system we have only limited access to administer, and something is Not Right.
What's to do?
One of PostgreSQL's dustier corners is its built-in administration functions, blessed by all who know about them. You need to have database superuser access to call most of them. As database superuser access is a
sine qua non of fixing problems, we assume it's in hand.
Find the pg_hba.conf:
SHOW hba_file;
Read its contents:
SELECT * FROM pg_catalog.pg_read_file('pg_hba.conf');
In pre-9.1 versions of PostgreSQL:
WITH f(name) AS (VALUES('pg_hba.conf'))
SELECT pg_catalog.pg_read_file(name, 0, (pg_catalog.pg_stat_file(name)).size) FROM f;
Strip out the commented and blank lines:
SELECT pg_catalog.regexp_replace(pg_catalog.pg_read_file('pg_hba.conf'), '(#[^]\n*\n|\n\s*\n);
Once you can read the configuration files, you can see whether there's something glaringly wrong, and move forward.
In any case, shouldn't the first select be SELECT * FROM pg_catalog.pg_read_file('pg_hba.conf')?
Re: Debuntu, thanks for the heads-up. Will investigate and see how to approach those systems.
http://sdamkvartiry.com/