pgsql: Perform less setup work for AFTER triggers at transaction start.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Perform less setup work for AFTER triggers at transaction start.
Date: 2014-10-23 16:40:31
Message-ID: E1XhLR9-0004NK-Fj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Perform less setup work for AFTER triggers at transaction start.

Testing reveals that the memory allocation we do at transaction start
has small but measurable overhead on simple transactions. To cut
down on that overhead, defer some of that work to the point when
AFTER triggers are first used, thus avoiding it altogether if they
never are.

Patch by me. Review by Andres Freund.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/2781b4bea7db357be59f9a5fd73ca1eb12ff5a79

Modified Files
--------------
src/backend/commands/trigger.c | 428 ++++++++++++++++++++++------------------
1 file changed, 232 insertions(+), 196 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-10-23 17:12:14 pgsql: Improve ispell dictionary's defenses against bad affix files.
Previous Message Fujii Masao 2014-10-23 13:34:31 pgsql: Remove the unused argument of PSQLexec().