On Fri, Sep 5, 2014 at 7:45 PM, Peter Geoghegan <p...@heroku.com> wrote:
> Attached additional patches are intended to be applied on top off most
> of the patches posted on September 2nd [1].


I attach another amendment/delta patch, intended to be applied on top
of what was posted yesterday. I neglected to remove some abort logic
that was previously only justified by the lack of opportunistic
"memcmp() == 0" comparisons in all instances, rather than just with
abbreviated keys.

-- 
Peter Geoghegan
From c60b07dda3e81e1fc9a2e95c386faf1fccfe8f04 Mon Sep 17 00:00:00 2001
From: Peter Geoghegan <p...@heroku.com>
Date: Sat, 6 Sep 2014 14:56:37 -0700
Subject: [PATCH 8/8] Remove obsolete abort logic

Remove some abort logic that was previously only justified by the lack
of opportunistic "memcmp() == 0" comparisons in all instances, rather
than just with abbreviated keys.  That justification no longer stands.
---
 src/backend/utils/adt/varlena.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 6aa3eaa..db4eae1 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -2295,15 +2295,6 @@ bttext_abbrev_abort(int memtupcount, double rowhint, SortSupport ssup)
 	norm_key_card = key_distinct / (double) memtupcount;
 
 	/*
-	 * If this is a very low cardinality set generally, that is reason enough
-	 * to favor our strategy, since many comparisons can be resolved with
-	 * inexpensive memcmp() tie-breakers, even though abbreviated keys are of
-	 * marginal utility.
-	 */
-	if (norm_key_card < 0.05)
-		return false;
-
-	/*
 	 * Abort abbreviation strategy.
 	 *
 	 * The worst case, where all abbreviated keys are identical while all
-- 
1.9.1

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to