Re: Need to find the no. of connections for a database

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Need to find the no. of connections for a database
Date: 2020-02-28 06:03:18
Message-ID: bbe88803-4b16-34a7-255f-81f47bd2823d@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 2/27/20 10:38 PM, rob stone wrote:
>
> If the menu is built from a table in your database, then when
> "Processing report" starts you could set a flag (boolean) against those
> items so that if anybody tried to log-in or access those items, you
> could simply display a message along the lines of "Processing report is
> running. Please try again later".
>
> When "Processing report" finishes, it just clears that flag.
>
> HTH,
> Rob
>

Conversely, the OP could be asking for a way to turn "process report" to
active state when no one is using the other features: each of them could
set a lock/counter I guess and when all counters are zero enable process
button.  The notion of waiting for "all clear" from the app or the db
before running reports does seem odd though.  Do certain actions from
the app leave the database in an inconsistent state and break the report
were it run at the same time?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pól Ua Laoínecháin 2020-02-28 07:28:09 Recursive CTEs and randomness - is there something I'm missing?
Previous Message rob stone 2020-02-28 05:38:42 Re: Need to find the no. of connections for a database