pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Cc: pgsql-docs@postgresql.org
Subject: Re: ModifyTable, EXPLAIN ANALYZE and AFTER triggers
Date: Wed, 02 Mar 2011 10:29:53 -0500
Message-ID: <17240.1299079793@sss.pgh.pa.us> (raw)
In-Reply-To: <4D6E2495.9010400@cs.helsinki.fi>
References: <4D6E2495.9010400@cs.helsinki.fi>

Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> writes:
> The recent commit 09b49a8439fde63826f93f55430868cf2585644b claims:

> +    Time spent firing triggers, if any, is charged to the Insert,
> +    Update, or Delete node, and is also shown separately for each trigger.
> +    Note, however, that deferred triggers will not be fired until end of
> +    transaction and are thus not accounted for in the output of
> +    <command>EXPLAIN ANALYZE</command>.

> But that's only part of the truth; the ModifyTable nodes queue AFTER 
> triggers, but don't actually fire them.  I remember there was some 
> discussion during 9.0's development about making the ModifyTable nodes 
> also count the time spent firing AFTER triggers, but I don't remember 
> what we decided back then.  Meanwhile, I think this part in the 
> documentation needs a small clarification.

Oh, you're right --- I was thinking that the fireASTriggers call would
actually execute the triggers, but of course it only queues them.
Will fix.

			regards, tom lane



view thread (2+ messages)

Message-ID: <17240.1299079793@sss.pgh.pa.us>
Permalink:  ../17240.1299079793@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17240.1299079793@sss.pgh.pa.us

 · 

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-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marko.tiikkaja@cs.helsinki.fi
  Subject: Re: ModifyTable, EXPLAIN ANALYZE and AFTER triggers
  In-Reply-To: <17240.1299079793@sss.pgh.pa.us>

* 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