Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F0C7E475EE2 for ; Fri, 18 Oct 2002 03:33:13 -0400 (EDT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id B69AB475C8B for ; Fri, 18 Oct 2002 03:33:12 -0400 (EDT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Fri Oct 18 09:33:10 2002 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id JAA13445; Fri, 18 Oct 2002 09:33:10 +0200 (METDST) Message-ID: <3DAFB935.5E6980B1@rodos.fzk.de> Date: Fri, 18 Oct 2002 09:33:09 +0200 From: Christoph Haller X-Mailer: Mozilla 4.06 [en] (X11; I; HP-UX B.10.20 9000/780) MIME-Version: 1.0 To: lud_nowhere_man@yahoo.com Cc: pgsql-sql@postgresql.org Subject: Re: Locking that will delayed a SELECT Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/205 X-Sequence-Number: 9922 > Suppose I have a transaction (T1) which executes a > complicated stored procedure. While T1 is executing, > trasaction #2 (T2) begins to execute. > > T1 take more time to execute that T2 in such a way > that T2 finished earlier than T1. The result is that > t2 returns set of data before it can be modified by > T1. > > Given the above scenario. Is there a way such that > while T2 will only read that value updated by T1 (i.e. > T2 must wait until T1 is finished) ? What locks should > I used since a portion of T1 contains SELECT > statements? Should I used the "SERIALIZABLE > isolation". What's wrong about this question? I'm interested in an answer, too. Regards, Christoph