Re: Need to find the no. of connections for a database - Mailing list pgsql-general

From Rob Sargent
Subject Re: Need to find the no. of connections for a database
Date
Msg-id bbe88803-4b16-34a7-255f-81f47bd2823d@gmail.com
Whole thread Raw
In response to Re: Need to find the no. of connections for a database  (rob stone <floriparob@gmail.com>)
Responses Re: Need to find the no. of connections for a database  ("sivapostgres@yahoo.com" <sivapostgres@yahoo.com>)
List 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?



pgsql-general by date:

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