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 1ptr0k-0005eM-Pl for pgsql-hackers@arkaria.postgresql.org; Tue, 02 May 2023 14:29:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ptr0j-0003D4-4c for pgsql-hackers@arkaria.postgresql.org; Tue, 02 May 2023 14:29:45 +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 1ptr0i-0003Cv-RP for pgsql-hackers@lists.postgresql.org; Tue, 02 May 2023 14:29:44 +0000 Received: from mail-yw1-x1131.google.com ([2607:f8b0:4864:20::1131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ptr0g-0008KP-Bo for pgsql-hackers@postgresql.org; Tue, 02 May 2023 14:29:43 +0000 Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-55a10577911so37590857b3.0 for ; Tue, 02 May 2023 07:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1683037781; x=1685629781; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=PHnNYRfIDqgCOCzPKW3oxiEgRSeUatS4b+ED1TIR2VI=; b=PujEbBSzcrXyTgWd43QuBrI6Udz5xvBX0ExHr+WzRZeW4kCKXI4Ujtg5rrseTJFwQQ /mRu52XZ1nB4gW/w7lt7rPkcypeHcOeSE4X/EjwH7zg4cy4A+MGdsEyswLIXaFmC3jPb o6YRP2be+FMTXKFmZ6chKMjWaPFFIUgrOlzWM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683037781; x=1685629781; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PHnNYRfIDqgCOCzPKW3oxiEgRSeUatS4b+ED1TIR2VI=; b=kRLVydkonPEvHwSeIwINf9PK/jTmwQmg3SILovkPnCNDl8wZwoMr8zBWxz4y7Krd3s i0jso52yozR0w4VQpnKhS6UiwrOhOIyLrn0IHUs8np3ueVkMx69fv9PmZSwGHggTnw9Z yeGCUVZCvmS38OdK21jlRQIa/3K4Xs9BXBDgp3GDI4g7701tg7aOCp2F/gTCjDS4OLYU 0gPTI0SHZoefWTmP7WYBvi6xI3G8yza+pbJJ8Z4/L8vZkICSpWSN4GJdedxueKr6mZZm TakgTurqLYPNiGRxtLvgPN7WBiDR+AL6ArEG8qvHIpW9PhL/jKfweKq9TFwV8hqJukTz nlJw== X-Gm-Message-State: AC+VfDw3JzqpBzuZ5eCSf160Nu3P9Xf84lCk8atiCqb2HVdpq9A77ntx 4ASYYaYMojxSIkiGLKayJDSVs6IV1DIMN/7lkN0= X-Google-Smtp-Source: ACHHUZ6xqe62CJKPbtUGL9wvv3qFNMkw7jssYYwBbHqXNX/bC44pgHQ7SN9abwE5BDX1MujBNfZeJw== X-Received: by 2002:a81:7185:0:b0:559:f81b:9734 with SMTP id m127-20020a817185000000b00559f81b9734mr12832037ywc.33.1683037781645; Tue, 02 May 2023 07:29:41 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id m10-20020a0dca0a000000b0055ac779d894sm21252ywd.83.2023.05.02.07.29.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2023 07:29:41 -0700 (PDT) Date: Tue, 2 May 2023 07:29:38 -0700 From: Noah Misch To: Jeff Davis , Peter Eisentraut Cc: Robert Haas , pgsql-hackers@postgresql.org Subject: Re: ICU locale validation / canonicalization Message-ID: <20230502142938.GA2432446@rfd.leadboat.com> References: <7ee414ad-deb5-1144-8a0e-b34ae3b71cd5@enterprisedb.com> <4efdd7bdf9c811e1a32b8d10524bae8040367068.camel@j-davis.com> <6880701fd5cd5183ad7ff3a73d5c9291d6c2e331.camel@j-davis.com> <04182066-7655-344a-b8b7-040b1b2490fb@enterprisedb.com> <2a9013df9a197aa5eb2d85b5f7ec0c5a726b6a2e.camel@j-davis.com> <3e45a760-a7f8-80af-e4b0-be91427359d3@enterprisedb.com> <5293249a-a361-5a5a-a61e-4e8049a75837@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5293249a-a361-5a5a-a61e-4e8049a75837@enterprisedb.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 30, 2023 at 08:59:41AM +0200, Peter Eisentraut wrote: > On 30.03.23 04:33, Jeff Davis wrote: > >Attached is a new version of the final patch, which performs > >canonicalization. I'm not 100% sure that it's wanted, but it still > >seems like a good idea to get the locales into a standard format in the > >catalogs, and if a lot more people start using ICU in v16 (because it's > >the default), then it would be a good time to do it. But perhaps there > >are risks? > > I say, let's do it. The following is not cause for postgresql.git changes at this time, but I'm sharing it in case it saves someone else the study effort. Commit ea1db8a ("Canonicalize ICU locale names to language tags.") slowed buildfarm member hoverfly, but that disappears if I drop debug_parallel_query from its config. Typical end-to-end duration rose from 2h5m to 2h55m. Most-affected were installcheck runs, which rose from 11m to 19m. (The "check" stage uses NO_LOCALE=1, so it changed less.) From profiles, my theory is that each of the many parallel workers burns notable CPU and I/O opening its ICU collator for the first time. debug_parallel_query, by design, pursues parallelism independent of cost, so this is working as intended. If it ever matters in non-debug configurations, we might raise the default parallel_setup_cost or pre-load ICU collators in the postmaster.