Disable / bypass authentication in PostgreSQL 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).
The default Linux distribution of PostgreSQL (https://www.postgresql.org/download/) creates the system user "postgres", simply by installing the package from there.
It also has the default behaviour, that this user may access the database without password.

This is set up via the config file pg_hba.conf (https://www.postgresql.org/docs/9.2/auth-pg-hba-conf.html):

# Rule Name: local access as postgres user
local   all     postgres                                ident   


So, on Linux you simply can change to this user with


  su - postgres (for root users)


or


  sudo -u postgres -i (for sudo users)


Windows has a similar command "runas" since XP/2003.

When connecting to Postgresql server via a command like

psql


the server asks the operating system for the executing user and that's it.
You won't even need to set a password. 
Because pg_hba.conf defines local superuser access for this user.

createdb test 
pgbench -i test 
pgbench test