pgsql: Remove derived fields from RI_QueryKey, and do a bit of other cl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Remove derived fields from RI_QueryKey, and do a bit of other cl
Date: 2012-06-18 22:51:03
Message-ID: E1Sgkml-0005f3-Oa@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove derived fields from RI_QueryKey, and do a bit of other cleanup.

We really only need the foreign key constraint's OID and the query type
code to uniquely identify each plan we are caching for FK checks. The
other stuff that was in the struct had no business being used as part of
a hash key, and was all just being copied from struct RI_ConstraintInfo
anyway. Get rid of the unnecessary fields, and readjust various function
APIs to make them use RI_ConstraintInfo not RI_QueryKey as info source.

I'd be surprised if this makes any measurable performance difference,
but it certainly feels cleaner.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/03a5ba24b096a9acbbc9682adc0a27d1db31c570

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c | 458 +++++++++++++++--------------------
1 files changed, 194 insertions(+), 264 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2012-06-18 23:37:34 pgsql: Allow ON UPDATE/DELETE SET DEFAULT plans to be cached.
Previous Message Peter Eisentraut 2012-06-18 21:00:37 pgsql: pg_dump: Add missing newlines at end of messages