pgsql: Arrange to cache a ResultRelInfo in the executor's EState for - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Arrange to cache a ResultRelInfo in the executor's EState for
Date
Msg-id 20070815213950.6F28F754259@cvs.postgresql.org
Whole thread Raw
List 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)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Repair problems occurring when multiple RI updates have to be
Next
From: eggyknap@pgfoundry.org (User Eggyknap)
Date:
Subject: pgsnmpd - pgsnmpd: Beginnings (and middlings, probably) of a Perl script