X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5754F52B48 for ; Mon, 15 Aug 2005 14:03:59 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61826-02 for ; Mon, 15 Aug 2005 17:03:56 +0000 (GMT) Received: from web53509.mail.yahoo.com (web53509.mail.yahoo.com [206.190.37.70]) by svr1.postgresql.org (Postfix) with SMTP id 097D152B42 for ; Mon, 15 Aug 2005 14:03:55 -0300 (ADT) Received: (qmail 49949 invoked by uid 60001); 15 Aug 2005 17:03:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bnYCKFuwKGsN+NiS1hOyHxUBvmp0fwXc5c4+l8sRpWpEqVZb9OIsS1d0NjqgPjxw/u9C4m63tAe47SSP/gPRWoIUWa51lxNMWdSMSVzVypSgr8+FowFtTCYfX7V6Zf1zxMqLocDuyAhtfGYv+IrYnTDSLE3WuWvAn58wVxcLG7k= ; Message-ID: <20050815170354.49947.qmail@web53509.mail.yahoo.com> Received: from [209.87.238.132] by web53509.mail.yahoo.com via HTTP; Mon, 15 Aug 2005 10:03:54 PDT Date: Mon, 15 Aug 2005 10:03:54 -0700 (PDT) From: jing han Subject: problems about updating a table and cluster this table at the same time To: postgres interface MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.111 required=5 tests=[AWL=-0.140, DNS_FROM_RFC_ABUSE=0.374, FROM_ENDS_IN_NUMS=0.516, FROM_HAS_ULINE_NUMS=0.361] X-Spam-Level: * X-Archive-Number: 200508/28 X-Sequence-Number: 5699 Hello, I work on a large database. I make use of cron job to cluster certain database table periodically. I found when updating a table and clusterdb cron job happens to run at exactly the same time clustering that table, then both updating and clustering stuck. Database server hault. This cause my system hault. I tried to lock that table using 'lock tableName' command before updating that table, I run 'clusterdb -t tableName dbName', I found clusterdb ignore the fact that the table is locked and go ahead finishing cluster job. So how can I protect the table when I update it to avoid cluster cron job interrupt the update? Any suggestion will be greatly appreciated! jing ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs