peer authentication
Login to PostgreSQL over the local socket: the server asks the kernel which Linux user connected and admits them only to the role with the same name. Hence sudo -u postgres psql.
Login to PostgreSQL over the local socket: the server asks the kernel which Linux user connected and admits them only to the role with the same name. Hence sudo -u postgres psql.