Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1be4eb1

Browse files
committed
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.
1 parent f259e71 commit 1be4eb1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/backend/utils/adt/varlena.c

+10-2
Original file line numberDiff line numberDiff line change
@@ -1744,14 +1744,22 @@ static void
17441744
btsortsupport_worker(SortSupport ssup, Oid collid)
17451745
{
17461746
TextSortSupport *tss;
1747+
bool abbreviate = ssup->abbreviate;
17471748

17481749
/*
17491750
* WIN32 requires complex hacks when the database encoding is UTF-8 (except
17501751
* when using the "C" collation). For now, we don't optimize that case.
1752+
* The use of abbreviated keys is also disabled on Windows, because
1753+
* strxfrm() doesn't appear to work properly on some Windows systems.
1754+
* Ideally, we would use it on those systems where it's reliable and
1755+
* skip it only for the rest, but at the moment we don't know how to
1756+
* distinguish between the ones where it works and the ones where it
1757+
* doesn't.
17511758
*/
17521759
#ifdef WIN32
17531760
if (GetDatabaseEncoding() == PG_UTF8 && !lc_collate_is_c(collid))
17541761
return;
1762+
abbreviate = false;
17551763
#endif
17561764

17571765
/*
@@ -1838,7 +1846,7 @@ btsortsupport_worker(SortSupport ssup, Oid collid)
18381846
else
18391847
ssup->abbrev_full_comparator = ssup->comparator = bttextfastcmp_locale;
18401848

1841-
if (!lc_collate_is_c(collid) || ssup->abbreviate)
1849+
if (!lc_collate_is_c(collid) || abbreviate)
18421850
{
18431851
/*
18441852
* Abbreviated case requires temp buffers for strxfrm() copying.
@@ -1852,7 +1860,7 @@ btsortsupport_worker(SortSupport ssup, Oid collid)
18521860
ssup->ssup_extra = tss;
18531861
}
18541862

1855-
if (!ssup->abbreviate)
1863+
if (!abbreviate)
18561864
return;
18571865

18581866
initHyperLogLog(&tss->abbr_card, 10);

0 commit comments

Comments
 (0)