pgsql: Arrange to cache a ResultRelInfo in the executor's EState for

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Arrange to cache a ResultRelInfo in the executor's EState for
Date: 2007-08-15 21:39:50
Message-ID: 20070815213950.6F28F754259@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Arrange to cache a ResultRelInfo in the executor's EState for relations that
are not one of the query's defined result relations, but nonetheless have
triggers fired against them while the query is active. This was formerly
impossible but can now occur because of my recent patch to fix the firing
order for RI triggers. Caching a ResultRelInfo avoids duplicating work by
repeatedly opening and closing the same relation, and also allows EXPLAIN
ANALYZE to "see" and report on these extra triggers. Use the same mechanism
to cache open relations when firing deferred triggers at transaction shutdown;
this replaces the former one-element-cache strategy used in that case, and
should improve performance a bit when there are deferred triggers on a number
of relations.

Modified Files:
--------------
pgsql/src/backend/commands:
explain.c (r1.164 -> r1.165)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/explain.c?r1=1.164&r2=1.165)
trigger.c (r1.217 -> r1.218)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.217&r2=1.218)
pgsql/src/backend/executor:
execMain.c (r1.295 -> r1.296)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execMain.c?r1=1.295&r2=1.296)
execUtils.c (r1.149 -> r1.150)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execUtils.c?r1=1.149&r2=1.150)
pgsql/src/include/executor:
executor.h (r1.141 -> r1.142)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/executor.h?r1=1.141&r2=1.142)
pgsql/src/include/nodes:
execnodes.h (r1.176 -> r1.177)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/execnodes.h?r1=1.176&r2=1.177)

Browse pgsql-committers by date

  From Date Subject
Next Message User Eggyknap 2007-08-16 04:48:00 pgsnmpd - pgsnmpd: Beginnings (and middlings, probably) of a Perl script
Previous Message Tom Lane 2007-08-15 19:16:12 pgsql: Repair problems occurring when multiple RI updates have to be