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 1ozjXt-0007hT-Ud for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Nov 2022 19:12:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ozjXs-0006Y9-O1 for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Nov 2022 19:12:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozjXs-0006Xr-D5 for pgsql-hackers@lists.postgresql.org; Mon, 28 Nov 2022 19:12:00 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ozjXl-0008DC-Hu for pgsql-hackers@postgresql.org; Mon, 28 Nov 2022 19:12:00 +0000 Received: by mail-lj1-x229.google.com with SMTP id r8so14273858ljn.8 for ; Mon, 28 Nov 2022 11:11:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sA9+ef3gU5htrNdObleYqSKXM5df8JQRqNWUAEK8KOs=; b=lyLAwVlQ+PAzKgEtWNlA8Ln2N4Qm7/pUkit2DU+uzktgSwYMNlsS5kb3fuL+er1OkO F+EaW0P7P61m11POO8gpi0aozNWmFHTA5dLLnhY4RiiJnglztha4Tq4BcpKxU62xhgnv 6HLZa4l50qEszZnO4uYBuY0VvS/F/P9REm3gdoCO4u2T5x+uchYT8KMGi4SxuHGLM3lO tAQ9tChOLqey1lVudMxREUnhtZLzoo29tSC9glMJ4DP+uzQ/BDqjkZ47CUw1r3XnwK+w oboTR2LmmAgHfyab3pqod1XvkTPThc0NM0Dj/NMQgvIU7cGUZJCwLilSJvD0DT8Ud0xD nr6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sA9+ef3gU5htrNdObleYqSKXM5df8JQRqNWUAEK8KOs=; b=wPN6xJ74E2XgokYpo5jIA273elLsEC+5jjgsgdQRajdbL9JYbzE9TlZraDAEHxyhIb qesNVb1WE5FS+SJWrEeuv4Gnz4eMR99eMR0FYd4y8+kH2ahFZ00LJSernBeRxdRM9yOE rAoWZx+DI3Kc5SuqwJBBTlR1aa0n5EfWdhZctIz++xk5WOQsMCazKbm7J9PYaHKDx7mw 9ZiXEWjlgdkcI2EQX33UldtxqV9hfAA/p3qAP1Y206OshfIOdx91k2eyIIwuE84prVGq Lji6bS47vq5AYLIXP9vBrElzEvmz82bU1ZReikLyPVSv9bL0wsHCnU1f9hzsShkqUSCd 72Lg== X-Gm-Message-State: ANoB5pmd3qB5bxyYs8EVdjOW7dQ3wuwFUOXgM7VZteiQ5qqVPz2BfuHJ ATqv6kawiso4qZ90ZEnTn/iUXIV29vhIVgS2b9I= X-Google-Smtp-Source: AA0mqf5II6O4L0sFo+ij4ckXUvvSWhqrRHE9lhxAn+O3ZTP/KNfBhliBkk+lQHdotyXf1cRxuqPB4W2B5/ryKL5l1YU= X-Received: by 2002:a2e:bc10:0:b0:279:99f6:7014 with SMTP id b16-20020a2ebc10000000b0027999f67014mr3706493ljf.94.1669662712457; Mon, 28 Nov 2022 11:11:52 -0800 (PST) MIME-Version: 1.0 References: <398aabd1-ad95-ba2d-d70a-dd5d90bf6e07@enterprisedb.com> <606bd2baa6d65b38fee6eb23bba40c5da210255b.camel@j-davis.com> <9f8e9b5a3352478d4cf7d6c0a5dd7e82496be4b6.camel@j-davis.com> In-Reply-To: From: Robert Haas Date: Mon, 28 Nov 2022 14:11:40 -0500 Message-ID: Subject: Re: Collation version tracking for macOS To: Thomas Munro Cc: Jeff Davis , Peter Eisentraut , Jeremy Schneider , Peter Geoghegan , "Finnerty, Jim" , "Nasby, Jim" , Tom Lane , pgsql-hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. 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 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. I don't know too much about this, though, so I might have it all wrong. -- Robert Haas EDB: http://www.enterprisedb.com