aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-01-20 20:32:21 -0500
committerRobert Haas <rhaas@postgresql.org>2015-01-20 20:32:21 -0500
commit1be4eb1b2d436d1375899c74e4c74486890d8777 (patch)
tree3d547f6825f9ffdcf37b37c730cecc8b77f7cb37 /src
parentf259e71dbe98f653182f0c710143487a0188fbc5 (diff)
downloadpostgresql-1be4eb1b2d436d1375899c74e4c74486890d8777.tar.gz
postgresql-1be4eb1b2d436d1375899c74e4c74486890d8777.zip
Disable abbreviated keys on Windows.
Most of the Windows buildfarm members (bowerbird, hamerkop, currawong, jacana, brolga) are unhappy with yesterday's abbreviated keys patch, although there are some (narwhal, frogmouth) that seem OK with it. Since there's no obvious pattern to explain why some are working and others are failing, just disable this across-the-board on Windows for now. This is a bit unfortunate since the optimization will be a big win in some cases, but we can't leave the buildfarm broken.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/varlena.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 71d47380ac6..5c6afbbd07b 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -1744,14 +1744,22 @@ static void
btsortsupport_worker(SortSupport ssup, Oid collid)
{
TextSortSupport *tss;
+ bool abbreviate = ssup->abbreviate;
/*
* WIN32 requires complex hacks when the database encoding is UTF-8 (except
* when using the "C" collation). For now, we don't optimize that case.
+ * The use of abbreviated keys is also disabled on Windows, because
+ * strxfrm() doesn't appear to work properly on some Windows systems.
+ * Ideally, we would use it on those systems where it's reliable and
+ * skip it only for the rest, but at the moment we don't know how to
+ * distinguish between the ones where it works and the ones where it
+ * doesn't.
*/
#ifdef WIN32
if (GetDatabaseEncoding() == PG_UTF8 && !lc_collate_is_c(collid))
return;
+ abbreviate = false;
#endif
/*
@@ -1838,7 +1846,7 @@ btsortsupport_worker(SortSupport ssup, Oid collid)
else
ssup->abbrev_full_comparator = ssup->comparator = bttextfastcmp_locale;
- if (!lc_collate_is_c(collid) || ssup->abbreviate)
+ if (!lc_collate_is_c(collid) || abbreviate)
{
/*
* Abbreviated case requires temp buffers for strxfrm() copying.
@@ -1852,7 +1860,7 @@ btsortsupport_worker(SortSupport ssup, Oid collid)
ssup->ssup_extra = tss;
}
- if (!ssup->abbreviate)
+ if (!abbreviate)
return;
initHyperLogLog(&tss->abbr_card, 10);