Re: postgres (superuser) cannot connect to database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Holger Jakobs <holger(at)jakobs(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: postgres (superuser) cannot connect to database
Date: 2022-11-23 14:18:31
Message-ID: 3693542.1669213111@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Holger Jakobs <holger(at)jakobs(dot)com> writes:
> How come a user who has issued "set role to postgres", so that the
> current user is postgres, cannot connect to a database?

\c makes a fresh connection to the server. SET ROLE in your old
session will not carry over to that (nor any other session state).

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message jagjit singh 2022-11-23 22:15:58 Reg: TLS Implementation
Previous Message Laurenz Albe 2022-11-23 14:14:01 Re: postgres (superuser) cannot connect to database