pgsql: Some refinement for the "fast path" lock patch.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Some refinement for the "fast path" lock patch.
Date: 2011-07-19 16:13:07
Message-ID: E1QjCux-0007u3-5C@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Some refinement for the "fast path" lock patch.

1. In GetLockStatusData, avoid initializing instance before we've ensured
that the array is large enough. Otherwise, if repalloc moves the block
around, we're hosed.

2. Add the word "Relation" to the name of some identifiers, to avoid
assuming that the fast-path mechanism will only ever apply to relations
(though these particular parts certainly will). Some of the macros
could possibly use similar treatment, but the names are getting awfully
long already.

3. Add a missing word to comment in AtPrepare_Locks().

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8e5ac74c1249820ca55481223a95b9124b4a4f95

Modified Files
--------------
src/backend/storage/lmgr/lock.c | 79 ++++++++++++++++++++------------------
1 files changed, 42 insertions(+), 37 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2011-07-19 16:22:31 pgsql: Remove O(N^2) performance issue with multiple SAVEPOINTs.
Previous Message Tom Lane 2011-07-19 14:57:22 Re: pgsql: Further thoughts about temp_file_limit patch.