pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: depesz@depesz.com
Cc: postgresql performance list <pgsql-performance@postgresql.org>
Subject: Re: Attempting to disable count triggers on cleanup
Date: Tue, 25 Sep 2007 07:39:42 -0400
Message-ID: <46F8F37E.9060204@fastcrypt.com> (raw)
In-Reply-To: <20070925112149.GA21433@depesz.com>
References: <46F8EC3A.4040607@fastcrypt.com>
	<20070925112149.GA21433@depesz.com>

hubert depesz lubaczewski wrote:
> On Tue, Sep 25, 2007 at 07:08:42AM -0400, Dave Cramer wrote:
>   
>> ERROR:  deadlock detected
>> DETAIL:  Process 23063 waits for ExclusiveLock on tuple (20502,48) of 
>> relation 48999028 of database 14510214; blocked by process 23110.
>> Process 23110 waits for ShareLock on transaction 1427023217; blocked by 
>> process 23098.
>> ...
>> CONTEXT:  SQL statement "update user_profile_count set 
>> buddycount=buddycount-1 where user_profile_count.uid= $1 "
>> PL/pgSQL function "user_buddy_count" line 11 at SQL statement
>> SQL statement "DELETE FROM ONLY "public"."user_buddies" WHERE 
>> "buddyuserid" = $1"
>>     
>
> take a look at:
> http://www.depesz.com/index.php/2007/09/12/objects-in-categories-counters-with-triggers/
>
> and if you want to temporarily disable trigger, simply do appropriate
> "alter table disable trigger".
>
>   
Well, that doesn't work inside a transaction I've tried it. This has 
been fixed in 8.3

Dave
> depesz
>
>   




view thread (3+ messages)

Message-ID: <46F8F37E.9060204@fastcrypt.com>
Permalink:  ../46F8F37E.9060204@fastcrypt.com/
Also on:    postgresql.org/message-id/46F8F37E.9060204@fastcrypt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pg@fastcrypt.com, depesz@depesz.com
  Subject: Re: Attempting to disable count triggers on cleanup
  In-Reply-To: <46F8F37E.9060204@fastcrypt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox