I need to run benchmarks (pgbench
) in different environments on different versions of PostgreSQL. Authentication works inconsistently and is a generally huge headache / adds a lot of fragile workarounds around the code that has no reason to care about access to the database.
Is there any way I could do something similar to MySQL:
update user set authentication_string=password(''),
plugin='mysql_native_password'
where user='root';
and be done with it forever?
I would also be interested in being able to run the database and utilities as super-user (root
). Again, I have no interest in all the security dance, there's nothing to protect, but the price for authentication is too high (weeks of work in order to make scripts work reliably, while they aren't even the main focus of my work).
Best Answer
Normally, the entries in the pg_hba.conf file demand a password from the client.
But if you change the authentication method (in the last column) from the usual
password
/md5
/scram-sha-256
totrust
, then... and does not even ask for a password.