pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Holger Jakobs <holger@jakobs.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: postgres (superuser) cannot connect to database
Date: Wed, 23 Nov 2022 09:18:31 -0500
Message-ID: <3693542.1669213111@sss.pgh.pa.us> (raw)
In-Reply-To: <82e7c3a1-7ab8-0b2e-910e-26946f27dde6@jakobs.com>
References: <82e7c3a1-7ab8-0b2e-910e-26946f27dde6@jakobs.com>

Holger Jakobs <holger@jakobs.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





view thread (3+ messages)

Message-ID: <3693542.1669213111@sss.pgh.pa.us>
Permalink:  ../3693542.1669213111@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3693542.1669213111@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: postgres (superuser) cannot connect to database
  In-Reply-To: <3693542.1669213111@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox