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

2020-02-28 Thread sivapostg...@yahoo.com
Since the no. of entry screens to be locked might increase with enhancement(s), the approach could be  1.  On completion of all entries by all,  say for a day.2.  When opening the report, check whether only one user has logged in.  Close the report window, if there are more than one users.3.  F

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

2020-02-27 Thread Rob Sargent
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 "Pro

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

2020-02-27 Thread rob stone
Hello, On Fri, 2020-02-28 at 01:10 +, sivapostg...@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

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

2020-02-27 Thread sivapostg...@yahoo.com
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

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

2020-02-27 Thread Ireneusz Pluta/wp.pl
W dniu 2020-02-27 o 15:26, sivapostg...@yahoo.com pisze: Need to lock around 10 tables.  Let me try with pg_advisory_lock(). I am not sure why you mention table locks at this point. Just in case: with advisory locks you lock an "application flow", not database objects. On Thursday, 27 Feb

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

2020-02-27 Thread sivapostg...@yahoo.com
Need to lock around 10 tables.  Let me try with pg_advisory_lock(). On Thursday, 27 February, 2020, 07:39:13 pm IST, Ireneusz Pluta/wp.pl wrote: W dniu 2020-02-27 o 14:37, sivapostg...@yahoo.com pisze: > Hello, > > I'm saying isolation will not work out to my requirement.   The steps.

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

2020-02-27 Thread Ireneusz Pluta/wp.pl
W dniu 2020-02-27 o 14:37, sivapostg...@yahoo.com pisze: Hello, I'm saying isolation will not work out to my requirement.   The steps. 1.  On completion of all entries by all,  say for a day. 2.  Lock, so that no one enters any other data. 3.  Create a report from the entered data. 4.  Create /

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

2020-02-27 Thread sivapostg...@yahoo.com
Hello, I'm saying isolation will not work out to my requirement.   The steps. 1.  On completion of all entries by all,  say for a day.2.  Lock, so that no one enters any other data.3.  Create a report from the entered data.4.  Create / Modify required entries from the values arrived in the repor

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

2020-02-27 Thread Ireneusz Pluta/wp.pl
W dniu 2020-02-27 o 12:35, sivapostg...@yahoo.com pisze: I need to prevent other users from entering any transaction till I finish taking reports from my application.  All users will be using the same application, from which this report is supposed to be printed. maybe advisory lock is what y

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

2020-02-27 Thread Ravi Krishna
"If they enter any data, those data also need to be taken into account in this report. " Pls read on PG's MVCC architecture. In SQLServer, unless you enabled its bad implementation of Snapshot isolation, you can't achieve the same. So it makes sense there. In PG it is easy to ensure that you

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

2020-02-27 Thread sivapostg...@yahoo.com
Well, I need to prevent other users from entering any transaction till I finish taking reports from my application.  All users will be using the same application, from which this report is supposed to be printed.   If they enter any data, those data also need to be taken into account in this re

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

2020-02-27 Thread Ravi Krishna
> > Before taking a few reports, we need to ensure that only one connection is > made to the database and all other computers need to close the connection to > that database. This is to prevent any additional entry(ies) that could be > made during the course of the report taking. This single

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

2020-02-27 Thread Peter J. Holzer
On 2020-02-27 07:41:36 +, sivapostg...@yahoo.com wrote: > Before taking a few reports, we need to ensure that only one connection is > made > to the database and all other computers need to close the connection to that > database. This is to prevent any additional entry(ies) that could be ma

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

2020-02-26 Thread sivapostg...@yahoo.com
Hello, Before taking a few reports, we need to ensure that only one connection is made to the database and all other computers need to close the connection to that database.   This is to prevent any additional entry(ies) that could be made during the course of the report taking.  This single-use