Re: Checking if a table locked from pl/pgsql

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Checking if a table locked from pl/pgsql
Дата
Msg-id 200203271536.g2RFadv27182@saturn.janwieck.net
обсуждение исходный текст
Ответ на Re: Checking if a table locked from pl/pgsql  (Hal Davison <hal@faams.net>)
Ответы Re: Checking if a table locked from pl/pgsql  (Hal Davison <hal@faams.net>)
Re: Checking if a table locked from pl/pgsql  ("Jose Luis LG" <jlopezgonz@terra.es>)
Список pgsql-interfaces
Hal Davison wrote:
>
> In an operational sense, if a user is updating a table for some accounting
> function then decides to go to lunch leaving the table locked.
   Exactly  what  I  expected.  You have a severe design flaw in   your application. Database transactions have to be
short and   never  held over actions that could infinitely block, such as   user interaction, period!
 
   You need application  level  advisory  locks.  The  abuse  of   database  locks  for  that  will  not  get you very
far.Your   application will not scale and suffer from problems like  the   one you already face.
 
   Ever   thought   about   adding   a  WEB  interface  to  that   application? If a user editing some account needs to
hold  a   DB   lock   all  the  time,  you'll  not  implement  it  with   Apache/PHP, that's for sure already. And
you'llhave to  make   alot  of  painfull pushups to do it with any other WEB server   technology.
 


Jan

>
> --Hal.
>
> ===========================================================
> Hal Davison                 Internet Petroleum Distribution
> Davison Consulting                LSE Linux V1.22
> 6850 Myakka Valley Tr    PostgreSQL 7.03 - Sun Forte - JAVA
> Sarasota, Florida 34241         Phone: (941) 921-6578
> http://www.faams.net             FAX: (941) 924-7135
> ===========================================================
>
> On Mon, 25 Mar 2002, Jan Wieck wrote:
>
> > Jose Luis LG wrote:
> > > Hi,
> > >
> > > Could anybody tell me if it is posible to check if a if a table is being
> > > locked from pl/pgsql functions.
> >
> >     Yes, it is not.
> >
> >     That  you ask for such a functionality leads to the question,
> >     why can a lock exist long enough that you want  to  check  at
> >     all?
> >
> >
> > Jan
> >
> > --
> >
> > #======================================================================#
> > # It's easier to get forgiveness for being wrong than for being right. #
> > # Let's break this rule - forgive me.                                  #
> > #================================================== JanWieck@Yahoo.com #
> >
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



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

Предыдущее
От: Hal Davison
Дата:
Сообщение: Re: Checking if a table locked from pl/pgsql
Следующее
От: Hal Davison
Дата:
Сообщение: Re: Checking if a table locked from pl/pgsql