Re: Trigger function in a multi-threaded environment behavior

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Hardik Belani <hardikbelani(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Trigger function in a multi-threaded environment behavior
Date: 2010-06-01 11:27:37
Message-ID: 1275391657.15468.4.camel@fsopti579.F-Secure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tis, 2010-06-01 at 16:40 +0530, Hardik Belani wrote:

> If we introduce postgres triggers (trigger functions) on some of the
> tables to track insert/update/delete operations, (This is done by
> keeping and updating a counter field for every insert, update and
> delete operation performed on a set of tables inside trigger function)
> at this point, one or more threads get stuck in lock while executing
> the query, to the extent that sometimes even with the pgadmin, the
> database tables cannot be updated.

You should be able to analyze the lock situation using the views
pg_locks and pg_stat_activity.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2010-06-01 11:49:34 Re: [RFC] A tackle to the leaky VIEWs for RLS
Previous Message Hardik Belani 2010-06-01 11:10:49 Trigger function in a multi-threaded environment behavior