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

Hi,

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.


Regards,
Marko Tiikkaja



view thread (2+ messages)  latest in thread

Message-ID: <4D6E2495.9010400@cs.helsinki.fi>
Permalink:  ../4D6E2495.9010400@cs.helsinki.fi/
Also on:    postgresql.org/message-id/4D6E2495.9010400@cs.helsinki.fi

 · 

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

* 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