Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D258B476115 for ; Wed, 16 Oct 2002 07:40:40 -0400 (EDT) Received: from web80305.mail.yahoo.com (web80305.mail.yahoo.com [66.218.79.21]) by postgresql.org (Postfix) with SMTP id 3188A475E24 for ; Wed, 16 Oct 2002 07:40:40 -0400 (EDT) Message-ID: <20021016114043.84798.qmail@web80305.mail.yahoo.com> Received: from [203.87.150.116] by web80305.mail.yahoo.com via HTTP; Wed, 16 Oct 2002 04:40:43 PDT Date: Wed, 16 Oct 2002 04:40:43 -0700 (PDT) From: Ludwig Lim Subject: Locking that will delayed a SELECT To: PostgreSQL Mailing List MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/172 X-Sequence-Number: 9889 Hi: 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". Thank you in advance. ludwig. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com