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

Поиск
Список
Период
Сортировка
От rob stone
Тема Re: Need to find the no. of connections for a database
Дата
Msg-id 35e84a26ea748f8f318069fd235d5201b5eb8dfa.camel@gmail.com
обсуждение исходный текст
Ответ на Re: Need to find the no. of connections for a database  ("sivapostgres@yahoo.com" <sivapostgres@yahoo.com>)
Ответы Re: Need to find the no. of connections for a database  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
Hello,

On Fri, 2020-02-28 at 01:10 +0000, sivapostgres@yahoo.com wrote:
> Then clearly I've misunderstood what advisory lock could do.   We
> used to put locks in SQL server to avoid deadlock situations.  I
> thought advisory lock is a similar one.   [ New to Postgres ]
> 
> The report is arrived from around 10 tables out of 300 tables that
> are in the database.  Once we start this process, we need to ensure
> that no other user could enter any data in those 10 tables, at least
> for the processing period.  I thought the table lock [ those 10
> tables ] will ensure no entry.  
> 
> We have a menu like this in our application
> 
> Purchase Entry
> Sales Entry
> Sales Cancellation
> Report
>         Processing report
> 
> When we enter the Processing report and click process, we need to
> ensure that no one could enter data from Purchase Entry, Sales Entry,
> Sales Cancellation, etc.
> 

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





В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: table name "unnest" specified more than once
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: Need to find the no. of connections for a database