X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 934B2D1B1FD for ; Tue, 20 Jul 2004 03:28:54 -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 09341-02 for ; Tue, 20 Jul 2004 06:28:47 +0000 (GMT) Received: from rock.spider.ru (rock.spider.ru [62.183.34.226]) by svr1.postgresql.org (Postfix) with ESMTP id 99912D1B179 for ; Tue, 20 Jul 2004 03:28:44 -0300 (ADT) Received: from rock (localhost [127.0.0.1]) by rock (Postfix) with SMTP id E00DE9141A for ; Tue, 20 Jul 2004 10:28:43 +0400 (MSD) Received: from sad.localnet.ru (amber.spider.ru [62.183.34.232]) by rock.spider.ru (Postfix) with ESMTP id 1C54791419 for ; Tue, 20 Jul 2004 10:28:43 +0400 (MSD) Content-Type: text/plain; charset="iso-8859-1" From: sad Organization: IT To: pgsql-sql@postgresql.org Subject: locks and triggers. give me an advice please Date: Tue, 20 Jul 2004 09:36:44 +0400 User-Agent: KMail/1.4.3 References: <000001c46ddd$491501d0$c201a8c0@borderveygqj37> <37d451f70407191529610a8eba@mail.gmail.com> In-Reply-To: <37d451f70407191529610a8eba@mail.gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200407200936.44292.sad@bankir.ru> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/122 X-Sequence-Number: 18374 Good day. often, I am turning triggers off and on to perform a mass operation on a=20 table, and i am interested how should i care of another user operations. the scene is: table t1 with user defined triggers and many tables reference t1, (so FK triggers defined on t1)=20 the operation i want to perform on t1 makes a great load to a server and have no use in triggers at all. the best way to perform this operation is to delete all records, modify, an= d=20 insert them back without changing any adjuscent table.=20 (this way takes a few seconds.) so i turn off triggers on t1 completely (updating pg_class.reltriggers) operate and turn on triggers on t1. it works fine. the question is: what should i do to prevent other users of data modification on the t1 and = the=20 adjuscent tables while triggers is off ? thnx. P.S. ...what about TEXT to REGCLASS casting ?