Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j7g2w-0006AT-DU for pgsql-general@arkaria.postgresql.org; Fri, 28 Feb 2020 13:51:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j7g2u-0005Zr-LD for pgsql-general@arkaria.postgresql.org; Fri, 28 Feb 2020 13:51:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j7g2t-0005Vi-Sr for pgsql-general@lists.postgresql.org; Fri, 28 Feb 2020 13:51:16 +0000 Received: from sonic305-20.consmr.mail.sg3.yahoo.com ([106.10.241.83]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j7g2n-0004KD-2B for pgsql-general@lists.postgresql.org; Fri, 28 Feb 2020 13:51:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1582897864; bh=AZXrYuoAVZUGi8ZogpGv9NK7vKHfGMM7tWsKMrMbhFc=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=REb8bdCPyN7dMuLtd4WqXDJ9p7M7RQ9aEfzOXtj1jeaDCgkTP3OS6e6QBUrnN+1f6CHPsE/UvrfzbByz9egb62SkaNyFXYKxA/C4PMIwsKsi1rySK9fHa1oh4YFJV4EBuG5a2ClTv6xtLnBNVzlE19JBGXO5xaFK5Fg3fha4qrAcSqTdQ82R1qNGY0YllX9erb2s6pPH1JfxQ8uZtW+gW3kskIQXkhKJjta4U4EuZn2nURmumLauuNnYGAArs7eRU+5id2urRrN/33ejrwQZNqxDMfketAGGJpx2a2A32SqqXzejYK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4JV6giuXaOVUZlm9ncbM8 fVp95p9UHtRww82H27kJhC0gCbs8Op3SdDRvfD7uKe0U5Ht3XGJ_9h6LhbdF2kcpNDZIHJjmFDsY JaQqu8rng2FKOmW9zrgVj.2ER2G96qUuY6kcgDIvpDX1R7MSJqYR1RMNxz7akxDeYWhVLUubmqzO 417bJ7eRLbnXXLDHdDad_LyO8LyO84TWK_gS8BxCdinUad.hLuTx9waP5QId0aolDpSsfByA6LdL i1Ed5db_QA02yhQHgr9Fl0c0zPKSUirf5FtgOzg3TBmJr7E61OrOHN6qzocJDPtmlkjTngLTc.WY UD.KlddxyX6i8Z2QceXmm7jpEzZy5IUYecwtLN4DkB4_wzrHmB7h1qb4HKqOXOjyD17j6_K9udnn auIXfndML Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.sg3.yahoo.com with HTTP; Fri, 28 Feb 2020 13:51:04 +0000 Received: by smtp414.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5f5e9b1bc53a30468e67ceffa9210047; Fri, 28 Feb 2020 13:50:58 +0000 (UTC) X-YMail-OSG: DM2S3VIVM1mzCxk09IuxAGFtFaXqgF5lP6jrsjMUtmzmniCi.jwWtewvug_KRN9 7E6GL2kjBJy.IJ8IFG7P3ulSX3HRVm8.w6eZB7wX6yhwZw1TB2RaLxENiJAKwOEPaJ7S.05xJidC FBR7Tm.kzGO8EXKJoRjEZL0JlKuNdEOFB8lQPnznqQlv6MaqbhxYvYNeG7QkoQe5qEvlJMzvfyHu Lsv8v_mfLYEXGlIBxyx0AiFeNKpwNlRMzUtYkiBptZ9vuxooQ44YyvAXQ2hXTHrGl7PA0XmIxAUH O30DsevEsOUObjWn7ep9fAHb.KM2i609cGD3PpPj8UtESHRtt2AY_WDbHpTJe2reF_MZxc84QRQE FXvK5QkKgf9mjj7X7Hj3Bpykx1YTq0cQsxyQuztthBYJUoCHxVTXurstfmQk77oRETxXMCqDkNoC yhabEuXcr36NLLHliOUgZWvQFdrBd917yD0Ap._3z2T4z37LbuteroVeZHoIMhJcrhyseVJv2XiJ fd_S07ymaZlfJS1VYlH3IxZtVDShpL6IxTAEsOsCfalghdylM2OtjINEIUQFcDam.23sg3.5ouRU xk4HGlfL3.wteWP6Ey2qbt.wOymcqz3KC6r9bTTfREfsMZEe7Akr._3qmX.SC2U4VuRIahcWlFFc U9xbZQ0qA1IXksTrumhDKNBAptM.SX1NZ34dDemRHoJ9QuanTkrAhSoIA4WParmRnRduH9S_n5X1 fYEyL0vVkF4GyCuIAaHOevmDYSMiLnMPiyaG3aTdnzKaFBhkqOzA641O03Pow.0Y5Dhm9SbRj1HH PhGG31MgbK9epbbCpWhf.EbayCh6N1fKKAhB4orOlppb0TqsREeJowqRkA_GWic4e7WkOUDXtv5D HIW9dHK9xa2INt8F1jyATfxhZxbCxhHbfkDaOkSmkSDoLaajR.tfaJwOMiIytDeUUszo.I8OH73Q b7FDL9.ltR473yICTotOidEAwtWoER6TFyWApRVg7X3DZcB9ToSCCnjbLhfpnnSRUqb1x_g80sHv 6zbUhqGPMabCcAPjy1Zrc2mjN94C9baAlBTxCjFJINrdfZlE4rTunlXCTD59t_rJmkDOuDIpK5h6 .LP5Q_N06fP9t4i2ic1fPUfXVTEflSQoBU.cNyjr3abOPqlZFmlv6bgNYYA_yRD7CznxbrVZp78Q wqp1B_qCM1rRW7806jcnsBRinZ.qGprMkivj2ZN3cZMqWKFrK0HIom2G06DdU.6KrSaTYq3I5Rdh Ef09L5.W7Uz46zHM84.UpkDSYeYPhR9vQvOemsvdyuryPoU7ggLm05p.xAYxf Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Fri, 28 Feb 2020 13:50:56 +0000 Date: Fri, 28 Feb 2020 13:50:52 +0000 (UTC) From: "sivapostgres@yahoo.com" Reply-To: "sivapostgres@yahoo.com" To: Postgresql General Group Message-ID: <1434627324.3350491.1582897852456@mail.yahoo.com> In-Reply-To: References: <1393516227.2562442.1582789296867.ref@mail.yahoo.com> <1393516227.2562442.1582789296867@mail.yahoo.com> <1654972450.2631031.1582803351218@mail.yahoo.com> <72f62e47-689a-351a-a711-6cfb7312d282@wp.pl> <1401820409.2680701.1582810637855@mail.yahoo.com> <561727835.2707508.1582813582038@mail.yahoo.com> <1151434427.3100461.1582852216341@mail.yahoo.com> <35e84a26ea748f8f318069fd235d5201b5eb8dfa.camel@gmail.com> Subject: Re: Need to find the no. of connections for a database MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3350490_1357220649.1582897852455" X-Mailer: WebService/1.1.15302 YMailNorrin Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36 Content-Length: 6858 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_3350490_1357220649.1582897852455 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Since the no. of entry screens to be locked might increase with enhancemen= t(s), the approach could be=C2=A0 1.=C2=A0 On completion of all entries by = all,=C2=A0 say for a day.2.=C2=A0 When opening the report, check whether on= ly one user has logged in.=C2=A0 Close the report window, if there are more= than one users.3.=C2=A0 Flag somewhere in the db, that the processing has = started.4.=C2=A0 Check at the opening event of the 'tobe locked screens', w= hether this flag set in point 3.=C2=A0 If set, quit the screen.5.=C2=A0 Cre= ate a report from the entered data. 6.=C2=A0 Create / Modify required entries from the values arrived in the re= port. [ long process ]7.=C2=A0 Once completed, commit all data.=C2=A0 Reset= the flag set in point 3.8.=C2=A0 Ensure that no data entered for the proce= ssed period.=C2=A0 Data entered will be for another date.=C2=A0 Data cannot= [should] not entered for the processed date. If this works out, we need to find a way to count the no. of users logged i= n the database.=C2=A0 =C2=A0 On Friday, 28 February, 2020, 11:35:48 am IST, Rob Sargent wrote: =20 =20 =20 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=20 active state when no one is using the other features: each of them could=20 set a lock/counter I guess and when all counters are zero enable process=20 button.=C2=A0 The notion of waiting for "all clear" from the app or the db= =20 before running reports does seem odd though.=C2=A0 Do certain actions from= =20 the app leave the database in an inconsistent state and break the report=20 were it run at the same time? =20 ------=_Part_3350490_1357220649.1582897852455 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Since the no. of entry scree= ns to be locked might increase with enhancement(s), the approach could be&n= bsp;
1.  On completion of all entries by all,  say for a day.
=
2.  When opening the repo= rt, check whether only one user has logged in.  Close the report windo= w, if there are more than one users.
3.  Flag somewhere in the db, that the processing has star= ted.
4.  Check at th= e opening event of the 'tobe locked screens', whether this flag set in poin= t 3.  If set, quit the screen.
5.  Create a report from the entered data.
6.  Create / Modify required entries from the values a= rrived in the report. [ long process ]
7. = Once completed, commit all data.  Reset the flag set in point 3.
8.  Ensure that no data = entered for the processed period.  Data entered will be for another da= te.  Data cannot [should] not entered for the processed date.

If this works out, we n= eed to find a way to count the no. of users logged in the database.  &= nbsp;

=20
=20
On Friday, 28 February, 2020, 11:35:48 am IST, Rob Sarg= ent <robjsargent@gmail.com> wrote:



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 s= o that if anybody tried to log-in or access those items, you
> could simply display a message along the lines of "Processing repo= rt is
> running. Please try again later".
>
> When "Processing report" finishes, it jus= t 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.&nb= sp; The notion of waiting for "all clear" from the app or the db
before running reports does seem odd though.  Do certain act= ions from
the app leave the database in an inconsistent = state and break the report
were it run at the same time?=



------=_Part_3350490_1357220649.1582897852455--