Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oukEh-0007UG-C2 for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Nov 2022 00:55:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oukEf-0006ik-Kq for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Nov 2022 00:55:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oukEf-0006iI-7S for pgsql-hackers@lists.postgresql.org; Tue, 15 Nov 2022 00:55:33 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oukEa-0000VI-Hd for pgsql-hackers@postgresql.org; Tue, 15 Nov 2022 00:55:31 +0000 Received: by mail-pg1-x535.google.com with SMTP id 136so11824332pga.1 for ; Mon, 14 Nov 2022 16:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=a1oFFYNusBWuY8l5M0haTuIzQbEBigz29wnZCDejqXk=; b=QP/fQOBR2Ucq7VKPxNHoaul6W2pjNfnn5AwKkNNhFzjanhCvbRYAoV1gs3InleU0/U x+dfHZ34EcTzVMO7yfgtA8y7yk49w1y8h9wm6a1v2df4Uu7BKX9zhT68W96W+ZW49JMA /CPGSC87qzg02nHA7inFCZa29tuTaHy02pKu0Mma4G8lAJ09zYnUKRiWHjlHsg4D1aS9 E++2VlMV/S3gMP4j3tBOuEalN1DsGpfa3CtWyAYpd7R7UAN8bOuySvL/Hda8ICosipHf ek1yBNVkKosuMyC82SwECeH9/783TuTj2iJirBqnjWpBJkbO/eW4f9A5STCdGLdnITiq 3ixQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=a1oFFYNusBWuY8l5M0haTuIzQbEBigz29wnZCDejqXk=; b=c7JWyL+cypSY4B3X/TWqoT366AHqyG7YG0XZP1SR3R81Sb7UCLCM4HGmcAmchn5c3/ EBTdpoRPKDigf5wJzZNu+ne3rgd/YEW94j+zVS/d5J3Dm+GVXuo32//9cG7C60Puf8wr YRXam1MDW7dK1Xd08/yz+u2OWwcjc8NNqDd1mdodOFexfK58Xw2ZUPZCQQrJA/rEDoxz rRUAPJjTVsKof5dqBGn3wRusL+jGpf0iWJDjvjanAHgV0UnzSzi/cRtyr7dZXjIcZ3af 0rEB/szSR/1c94sw6zgo/WbQabPSKym4D7YDuMYQFKggwM9qguKm2x6Yje4ZQ1qTkqdS XDKQ== X-Gm-Message-State: ANoB5pkbvh3W6S97PQCKKskcq524c+y479aSJR4inebDkX9WFgFOIdOl YRNW2kILGcwnkAXZDR8bRVgI7A== X-Google-Smtp-Source: AA0mqf7Xaq5WXHTI9ujbaX4gfY7LWemYQqXA/U2WfKs7qruiK0YXxC2ezcCNWkgKV3dFUXBVFSE+iw== X-Received: by 2002:a63:f64d:0:b0:46f:7e1c:e6e6 with SMTP id u13-20020a63f64d000000b0046f7e1ce6e6mr14047628pgj.138.1668473727449; Mon, 14 Nov 2022 16:55:27 -0800 (PST) Received: from [172.18.7.9] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id i6-20020aa796e6000000b005627ddbc7a4sm7342268pfq.191.2022.11.14.16.55.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 16:55:26 -0800 (PST) Message-ID: <606bd2baa6d65b38fee6eb23bba40c5da210255b.camel@j-davis.com> Subject: Re: Collation version tracking for macOS From: Jeff Davis To: Thomas Munro , Peter Eisentraut Cc: Jeremy Schneider , Peter Geoghegan , "Finnerty, Jim" , "Nasby, Jim" , Tom Lane , pgsql-hackers Date: Mon, 14 Nov 2022 16:55:25 -0800 In-Reply-To: References: <398aabd1-ad95-ba2d-d70a-dd5d90bf6e07@enterprisedb.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I looked at v6. * We'll need some clearer instructions on how to build/install extra ICU versions that might not be provided by the distribution packaging. For instance, I got a cryptic error until I used --enable-rpath, which might not be obvious to all users. * Can we have a better error when the library was built with -- disable-renaming? We can just search for the plain (no suffix) symbol. * We should use dlerror() instead of %m to report dlopen() errors. * It seems like the collation version is just there to issue WARNINGs when a user is using the non-versioned locale syntax and the library changes underneath them (or if there is collation version change within a single ICU major version)? * How are you testing this? * In my tests (sort, hacked so abbreviate is always false), I see a ~3% regression for ICU+UTF8. That's fine with me. I assume it's due to the indirect function call, but that's not obvious to me from the profile. If it's a major problem we could have a special case of varstrfastcmp_locale() that works on the compile-time ICU version. I realize your patch is experimental, but when there is a better consensus on the approach, we should consider adding declarative syntax such as: CREATE COLLATION (or LOCALE?) PROVIDER icu67 TYPE icu VERSION '67' AS '/path/to/icui18n.so.67'; It will offer more opportunities to catch errors early and offer better error messages. It would also enable it to function if the library is built with --disable-renaming (though we'd have to trust the user). On Sat, 2022-10-22 at 14:22 +1300, Thomas Munro wrote: > Problem 1:=C2=A0 Suppose you're ready to start using (say) v72.=C2=A0 I g= uess > you'd use the REFRESH command, which would open the main linked ICU's > collversion and stamp that into the catalogue, at which point new > sessions would start using that, and then you'd have to rebuild all > your indexes (with no help from PG to tell you how to find everything > that needs to be rebuilt, as belaboured in previous reverted work). > Aside from the possibility of getting the rebuilding job wrong (as > belaboured elsewhere), it's not great, because there is still a > transitional period where you can be using the wrong version for your > data.=C2=A0 So this requires some careful planning and understanding from > the administrator. How is this related to the search-by-collversion design? It seems like it's hard no matter what. --=20 Jeff Davis PostgreSQL Contributor Team - AWS