From: | rob stone <floriparob(at)gmail(dot)com> |
---|---|
To: | "sivapostgres(at)yahoo(dot)com" <sivapostgres(at)yahoo(dot)com>, Postgresql General Group <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Need to find the no. of connections for a database |
Date: | 2020-02-28 05:38:42 |
Message-ID: | 35e84a26ea748f8f318069fd235d5201b5eb8dfa.camel@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
On Fri, 2020-02-28 at 01:10 +0000, sivapostgres(at)yahoo(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Sargent | 2020-02-28 06:03:18 | Re: Need to find the no. of connections for a database |
Previous Message | David G. Johnston | 2020-02-28 04:45:06 | Re: table name "unnest" specified more than once |