Re: use superuser connection from php - Mailing list pgsql-general

From pobox@verysmall.org
Subject Re: use superuser connection from php
Date
Msg-id 4613DA71.7080902@verysmall.org
Whole thread Raw
In response to Re: use superuser connection from php  ("Albe Laurenz" <all@adv.magwien.gv.at>)
List pgsql-general
Albe Laurenz wrote:
 > You can connect as superuser on a different connection and issue that
 > SELECT statement.

OK

 > But I wouldn't do that. What if there is a problem and all availaible
 > superuser connections are exhausted? You would not be able to connect
 > to the database any more, even as superuser.

True.

 > I would rather examine the SQLSTATE you get from the failed connection
 > attempt. PostgreSQL returns SQLSTATE 53300 (TOO MANY CONNECTIONS) when
 > the maximum os reached. This way you can distinguish that case from
others.

Oh, thanks a lot for the hint!

Iv


pgsql-general by date:

Previous
From: "pobox@verysmall.org"
Date:
Subject: Re: use superuser connection from php
Next
From: Jonathan Vanasco
Date:
Subject: Re: inserting multiple values in version 8.1.5