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 1ozqm9-0004dJ-B3 for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 02:55:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ozqm7-00008n-U7 for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 02:55:11 +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 1ozqm7-00008d-Hb for pgsql-hackers@lists.postgresql.org; Tue, 29 Nov 2022 02:55:11 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ozqm0-0006PZ-Op for pgsql-hackers@postgresql.org; Tue, 29 Nov 2022 02:55:10 +0000 Received: by mail-pf1-x42e.google.com with SMTP id x66so12396727pfx.3 for ; Mon, 28 Nov 2022 18:55:04 -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=RtoY4Q7DVzXYTT7k4W8R05GDvbwXdFWHz0moHELnjkc=; b=SBMA1v/6joVso2VcrA8lxT8clROK81tytAJBr7SifIQm0nUIqLfTzZfzgzz4UgpTXC yL9pn38EhHQ8jqO0qTndXteENdEQHZ6q+HF0bhkWR/cElQ2gPPux37P3Jwct98LqW9nb ylNox1GoUDdEv2bs1XymMnGCYLIeEKLqNSkxoyIPZEV07hnHo+P/h57jYBQa75127cDu tgoLVRBntpUI4+1OJUVEjewDC+IRODfQd5EFICtAGZWzxyEUjEfDrGVqbiHarO0QsDWJ UgG0TW/pZfz0H0QOG9a+TnFL2NVSAAp+j4QLVlfxFtuPiIDHSpyJfPSnXZLYqY/FFYCE Rtnw== 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=RtoY4Q7DVzXYTT7k4W8R05GDvbwXdFWHz0moHELnjkc=; b=AEcrB1EqNAyjzlpCwlhYbXBwCjp9SR+A+SH2fa2PrCwaEJKeemGggfQ4KFSMpQMJXY hpQussbasrezBTJFqRvKBSS5sSt2OKc5Oj6JuXetyGk9omh5ieoRSTmq/gbXaRqpFRVC R3gDWayFTMBHDchyygNxbD0jWM2fLrzMqil7qrP/0TPkt/D4iPPMW4orU4e59PEh96j+ x2Tz52Ns1buMHaMQQK6sQ+KE4VYnJmqa7FzDTCThLXGHl0GPCtj47nopfGzSNbry01pj IY4oPMQxiiZ+s56MlDeOlc8gOipOYX/Mc6X9YIT9ZNADXhDoHX5YziPpc+lkN1CF667R I74Q== X-Gm-Message-State: ANoB5pmkJ5fKChfSwW0ddp1PxFRdh82Vxq4a4ySQndgBbJJUxoVS493L XU+aWbDc3xhwItNxACH9nwtAGw== X-Google-Smtp-Source: AA0mqf4gHKaWY+piSRAX+Ai2DitjayUQUQOjV4LwFJA2u3dQUhn8MJlT4yMwR60A2NX8vqyz3qx74Q== X-Received: by 2002:aa7:84c7:0:b0:574:9b8d:1873 with SMTP id x7-20020aa784c7000000b005749b8d1873mr22868550pfn.75.1669690503296; Mon, 28 Nov 2022 18:55:03 -0800 (PST) Received: from jeff-laptop.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id l3-20020a170903244300b001896522a23bsm7975454pls.39.2022.11.28.18.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 18:55:00 -0800 (PST) Message-ID: <0f7922d4f411376f420ec9139febeae4cdc748a6.camel@j-davis.com> Subject: Re: Collation version tracking for macOS From: Jeff Davis To: Thomas Munro Cc: Peter Eisentraut , Jeremy Schneider , Peter Geoghegan , "Nasby, Jim" , Tom Lane , pgsql-hackers Date: Mon, 28 Nov 2022 18:54:57 -0800 In-Reply-To: References: <398aabd1-ad95-ba2d-d70a-dd5d90bf6e07@enterprisedb.com> <606bd2baa6d65b38fee6eb23bba40c5da210255b.camel@j-davis.com> <9f8e9b5a3352478d4cf7d6c0a5dd7e82496be4b6.camel@j-davis.com> <346f836208a39009c1998ed5a41c7f1a0be36911.camel@j-davis.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 On Sat, 2022-11-26 at 18:27 +1300, Thomas Munro wrote: > Here's the first iteration. I will send a full review shortly, but I encountered an ICU bug along the way, which caused me some confusion for a bit. I'll skip past the various levels of confusion I had (burned a couple hours), and get right to the repro: Install the latest release of all major versions 50-69, and compile postgres against 70. You'll get: =3D# select * from pg_icu_collation_versions('en_US') order by icu_version; icu_version | uca_version | collator_version=20 -------------+-------------+------------------ 50.2 | 6.2 | 58.0.6.50 51.3 | 6.2 | 58.0.6.50 52.2 | 6.2 | 58.0.6.50 53.2 | 6.3 | 137.51 54.2 | 7.0 | 137.56 55.2 | 7.0 | 153.56 56.2 | 8.0 | 153.64 57.2 | 8.0 | 153.64 58.3 | 9.0 | 153.72 59.2 | 9.0 | 153.72 60.3 | 10.0 | 153.80 61.2 | 10.0 | 153.80 62.2 | 11.0 | 153.88 63.2 | 11.0 | 153.88 64.2 | 12.1 | 153.97 65.1 | 12.1 | 153.97 66.1 | 13.0 | 153.14 67.1 | 13.0 | 153.14 68.2 | 13.0 | 153.14 69.1 | 13.0 | 153.14 70.1 | 14.0 | 153.112 (21 rows) This is good information, because it tells us that major library versions change more often than collation versions, empirically- speaking. But did you notice that the version went backwards from 65.1 -> 66.1? Well, actually, it didn't. The version of that collation in 66.1 went from 153.97 -> 153.104. But there's a bug in versionToString() that does the decimal output incorrectly when there's a '0' digit between the hundreds and the ones place. I'll see about reporting that, but I thought I'd mention it here because it could have consequences, as we are storing the strings :-( The bug is still present in 70.1, but it's masked because it went to .112. Incidentally, this answers our other question about whether the collation version can change in a minor version update. Perhaps not, but if they fix this bug and backport it, then the version *string* will change in a minor update. Ugh. Regards, Jeff Davis