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 1p03SF-0007d6-Tw for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 16:27:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p03SE-00012y-Ni for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 16:27:30 +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 1p03SE-00012p-Es for pgsql-hackers@lists.postgresql.org; Tue, 29 Nov 2022 16:27:30 +0000 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p03SB-00054L-O5 for pgsql-hackers@postgresql.org; Tue, 29 Nov 2022 16:27:29 +0000 Received: by mail-qv1-xf2a.google.com with SMTP id c14so6073002qvq.0 for ; Tue, 29 Nov 2022 08:27:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joeconway.com; s=google; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=KMf33aA6nDuTw462+LUKw6X+NL9QY+EHJemVYhdw4BM=; b=HeQ9YyHRQEbM2qKGJegsOitQX+L7BZewsu+VTWGc3t38AZ9S924siIORXaq5LazpVQ RdIXh9F3YQrmAY/ArVGecYuQZ79wEuyxMMfbaa2ZQLalR87VUDOv9vuUOikBmlcy0KOG Ysh4Ta6umh9igkyt4iXLDtv+Q+kTLwTgCa5gYB37rN1CJMUBAthJsV4BjHJWHEG4g6LB ztW2Zsq0VvKcnR/6j0/3NHni9xfRvjkZrlWQYnW6BQDDwqvuZ23ANW5ppkuMdzqfDEEg HKR3WZMcChY7W/YcOHqa4gh0sUvFIFibomjJ7qJCI+Bd+yzp3jTLgW7O2Fgi0nn9nQDp EANw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KMf33aA6nDuTw462+LUKw6X+NL9QY+EHJemVYhdw4BM=; b=h3pq3hIMklX6csaEGJ7GmFR8APzjnV1iJGNm/b8Lnfga36k8IMfi0ccT1Ad+0KumWW 7H+MPiVJmBS/b/7rGl5feRZilu460BKxOCO0AVyHAU9toMKc2TGFgsgUPTH9v2ISqKf9 nHsGQt10jiNeRoftQ3DUHNWv+bhAmLg/q2mbZ41ATGFvdLFIgHnBdz5dpkFVgR1rPGf9 2moXyASr+JqTKv4zAFh5BFzOFklPpIi8yBhKUCwYqZcCWcfYcm94mKPuC0BDqcTD0V0q oy3klWq+DEupic2RZYrCQ1ye1K102wqTAv6mOy91KS7Obw6xVFCUNwVMVfEPrLHaAwGq 87fA== X-Gm-Message-State: ANoB5pncc/Q+Wa4GThrrPTMz87Y013/wTbl3IKzuBdKkTmEBn8/Ydqsh R36EkTKjlTVMxGAEJ5Qv5ndoOQ== X-Google-Smtp-Source: AA0mqf7RbwILYWj5J9zEk3FKoM8zPGAv3ZBsQSrVy6fg+04OOcB0KnYgpfcdIsu59moaV5F0OY+7Kw== X-Received: by 2002:a0c:c3cc:0:b0:4c6:a05d:f67e with SMTP id p12-20020a0cc3cc000000b004c6a05df67emr35631444qvi.4.1669739246858; Tue, 29 Nov 2022 08:27:26 -0800 (PST) Received: from [192.168.4.41] (162-239-31-113.lightspeed.dybhfl.sbcglobal.net. [162.239.31.113]) by smtp.gmail.com with ESMTPSA id az36-20020a05620a172400b006fc3fa1f589sm10889916qkb.114.2022.11.29.08.27.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Nov 2022 08:27:26 -0800 (PST) Message-ID: <5ca35de8-48a6-6d9f-6f92-82d9da9ce227@joeconway.com> Date: Tue, 29 Nov 2022 11:27:25 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US To: Robert Haas , Thomas Munro Cc: Jeff Davis , Peter Eisentraut , Jeremy Schneider , Peter Geoghegan , "Finnerty, Jim" , "Nasby, Jim" , Tom Lane , pgsql-hackers References: <398aabd1-ad95-ba2d-d70a-dd5d90bf6e07@enterprisedb.com> <606bd2baa6d65b38fee6eb23bba40c5da210255b.camel@j-davis.com> <9f8e9b5a3352478d4cf7d6c0a5dd7e82496be4b6.camel@j-davis.com> From: Joe Conway Subject: Re: Collation version tracking for macOS In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/28/22 14:11, Robert Haas wrote: > On Wed, Nov 23, 2022 at 12:09 AM Thomas Munro wrote: >> OK. Time for a new list of the various models we've discussed so far: >> >> 1. search-by-collversion: We introduce no new "library version" >> concept to COLLATION and DATABASE object and little or no new syntax. >> >> 2. lib-version-in-providers: We introduce a separate provider value >> for each ICU version, for example ICU63, plus an unversioned ICU like >> today. >> >> 3. lib-version-in-attributes: We introduce daticuversion (alongside >> datcollversion) and collicuversion (alongside collversion). Similar >> to the above, but it's a separate property and the provider is always >> ICU. New syntax for CREATE/ALTER COLLATION/DATABASE to set and change >> ICU_VERSION. >> >> 4. lib-version-in-locale: "63:en" from earlier versions. That was >> mostly a strawman proposal to avoid getting bogged down in >> syntax/catalogue/model change discussions while trying to prove that >> dlopen would even work. It doesn't sound like anyone really likes >> this. >> >> 5. lib-version-in-collversion: We didn't explicitly discuss this >> before, but you hinted at it: we could just use u_getVersion() in >> [dat]collversion. > > I'd like to vote against #3 at least in the form that's described > here. If we had three more libraries providing collations, it's likely > that they would need versioning, too. So if we add an explicit notion > of provider version, then it ought not to be specific to libicu. +many > I think it's OK to decide that different library versions are > different providers (your option #2), or that they are the same > provider but give rise to different collations (your option #4), or > that there can be multiple version of each collation which are > distinguished by some additional provider version field (your #3 made > more generic). I think provider and collation version are distinct concepts. The provider ('c' versus 'i' for example) determines a unique code path in the backend due to different APIs, whereas collation version is related to a specific ordering given a set of characters. > I don't really understand #1 or #5 well enough to have an educated > opinion, but I do think that #1 seems a bit magical. It hopes that the > combination of a collation name and a datcollversion will be > sufficient to find exactly one matcing collation in a list of provided > libraries. The advantage of that, as I understand it, is that if you > do something to your system that causes the number of matches to go > from one to zero, you can just throw another library on the pile and > get the number back up to one. Woohoo! But there's a part of me that > worries: what if the number goes up to two, and they're not all the > same? Probably that's something that shouldn't happen, but if it does > then I think there's kind of no way to fix it. With the other options, > if there's some way to jigger the catalog state to match what you want > to happen, you can always repair the situation somehow, because the > library to be used for each collation is explicitly specified in some > way, and you just have to get it to match what you want to have > happen. My vote is for something like #5. The collversion should indicate a specific immutable ordering behavior. -- Joe Conway PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com