Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9ZoC-0004zq-8m for pgsql-sql@arkaria.postgresql.org; Mon, 29 Jun 2015 14:13:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Z9ZoA-00016i-UL for pgsql-sql@arkaria.postgresql.org; Mon, 29 Jun 2015 14:13:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z9Zo9-00016E-Dj for pgsql-sql@postgresql.org; Mon, 29 Jun 2015 14:13:13 +0000 Received: from mbob.nabble.com ([162.253.133.15]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Z9Zo2-0006Ws-7r for pgsql-sql@postgresql.org; Mon, 29 Jun 2015 14:13:12 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mbob.nabble.com (Postfix) with ESMTP id 2307CFFE6F0 for ; Mon, 29 Jun 2015 07:13:53 -0700 (PDT) Date: Mon, 29 Jun 2015 07:13:05 -0700 (MST) From: gmb To: pgsql-sql@postgresql.org Message-ID: <1435587185136-5855697.post@n5.nabble.com> In-Reply-To: <559142D5.2080608@aklaver.com> References: <1435563798887-5855658.post@n5.nabble.com> <559142D5.2080608@aklaver.com> Subject: Re: Disable Trigger for session only MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Adrian Klaver-4 wrote >> >> Some notes: >> It cannot be guaranteed that the above happens as a single transaction. >> It is possible that this occurs at the same time as other session posting >> inserts/updates to table TEMP. > > It can if wrapped in BEGIN/COMMIT or is there reason that is not being > done? Sorry , what I meant to say was that as this stage this is not implemented in a single transaction (with BEGIN/COMMIT). Adrian Klaver-4 wrote >> I'm seeing data which suggests that trigger trigname did not occur when >> in >> fact it should have ( i.e. the above update procedure is not relevant ). >> Does this make sense taking into account that multiple sessions posts to >> the >> table at once ? > > Not without knowing what the trigger procedure does? The trigger being disabled is used to post summarized numeric values to a summary table. Actually what I'm trying to do here is to reset the values in the detail table to zero without updating the summary tables. Afterwards I'm updating from a zero value which means that the difference will be posted to the summary table. This kind of data fix is required where data on the summary tables was not posted as excepted for whatever reason. I guess my question is: If I encapsulate the "disable trigger/update/enable trigger" in BEGIN/COMMIT to handle as single transaction, are there guarantees that the disabling of the trigger will not have an effect on other sessions ? -- View this message in context: http://postgresql.nabble.com/Disable-Trigger-for-session-only-tp5855658p5855697.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql