Re: use superuser connection from php

From: "pobox(at)verysmall(dot)org" <pobox(at)verysmall(dot)org>
To: Albe Laurenz <all(at)adv(dot)magwien(dot)gv(dot)at>, pgsql-general(at)postgresql(dot)org
Subject: Re: use superuser connection from php
Date: 2007-04-04 17:03:45
Message-ID: 4613DA71.7080902@verysmall.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Manoj Lal 2007-04-04 18:02:27 Re: Postgres 7.4: how to disconnect users without restarting postmaster
Previous Message pobox@verysmall.org 2007-04-04 17:02:46 Re: use superuser connection from php