Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w015y-001Wr4-2p for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Mar 2026 17:42:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w015v-004zld-2X for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Mar 2026 17:42:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w015v-004zlU-1N for pgsql-hackers@lists.postgresql.org; Tue, 10 Mar 2026 17:42:11 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w015t-000000020Jc-1SPf for pgsql-hackers@postgresql.org; Tue, 10 Mar 2026 17:42:11 +0000 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-661d929219bso4137678a12.0 for ; Tue, 10 Mar 2026 10:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1773164528; x=1773769328; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=FdQPwsaBKwbbkE21voXu9IV+wHZUpa+cconouXdbLy0=; b=UkGrZ3hwCAbTU1FADdpg8BR4a4TkN7U0wh6SUBIBWSIkggSylfGr1J/+7JhK63LfIO fwsaNH2NwLgSiNEr+RCY9LYVz2KP35YCLTThTEog6U2uzZ0j2t7hPJfnGYG2WWBP2/UO sThyQvZxsoDaKp6od6oC59/vqywC01q0Tu/d9JFglOqcyl8qeO9G6KxqjJz2g5gqh2QK 5hLLOcY6UgvIBsOMMK0AM5Gm9J/IAuG5ujOOMW5ln4mnSjUpwvC5dxlM19jaVeWi6I8R TOg38NSyLu7cKS2c2WF3OnDE5SD8kgAhb3O1z7Zx4x9XSiheWiX89iih8JFql/ROxa+6 FFDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773164528; x=1773769328; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FdQPwsaBKwbbkE21voXu9IV+wHZUpa+cconouXdbLy0=; b=ZVhYoMaJy5T3F/IeDhLKX1w8a3q69wahpIy6yAVp+pxkbpnjZTXYtM/F6uSR51il2k pDhIuYyHju3oLjNP0Z8z/Z+O5NWxIgc8Mo77ptxpVv7tg+5lPVlOk23snVpSh21v24mI kUOnoUI5c7x+e16oeJhqUgB2M2nQGpc4snc/zmP+3+ZG6+qE2m066EmWNtVjIbRr1W0E cE+VlnCGNyPPkZXbUAlK+a/Hl3X6UO4zWsY8j1G2SPkoMA2HcoK5OdQQDVkWXKaoKV2v QsM4o4WPOO8yqO5IA3ckRlFTHF4x2AwtaEcy4ZFox7s/1W/RGdo0TXC2NOLMYmdmix2P az1Q== X-Forwarded-Encrypted: i=1; AJvYcCUGNLwkHA4WDqhdvFFvlh5pqudV1KxrRAL8f55/BFLNTPJgppG9a0nRzaXrz/ZQZ53jM8AOtUrKjZMiSyU7@postgresql.org X-Gm-Message-State: AOJu0YztNBXcu/ADa5XN6dM78zD1/vjRV9Hs2H+hUHlB1Sxvr8RVnXRu qQjdRyRvMP9YgwApR5v7xK35KUQSd/v4JN0rP7C+REJcBU72t9L5PTaJmTkxIpy6S8L9j4CwvgY WlVlf X-Gm-Gg: ATEYQzzHNqn00fOTYucJgc0vkaHNIEZCmp5rRfeAKdWMrB9KZRBID9bgECMiuMMxbWr UZtQjCKVcobqyH6QHm+Rk1WfSn3KSxO06xKrulTgG5oso3oVEXzrOaZzePjDsqxS1LPAkc3z8DW el855UjolJj2hoz0pnDXdFMO7IjheHxNW6+1yNI6fgGuYg5R284eKpjC3PdUAIEuxuaT8wW9BP9 tRoT6ZiYb6kwJvURf8qNpvX++LoV3QCYylhqwWf+/LWCHtXM/HH8oqL/b+GI3r/2nKcmhjVG8AB rw8iOVtkbFiiY05g65EMS5S8VpAQqislLM4ZE0DC+ha6FD7ppiznE53JSVhBaLiyZUckeAZYgaC 3Ik4Wh9nBzGQ9s6TsS9kOxAHdtpnUK+n37A0grLeQ5O+S1DOqauiK3WSEQ4fBXQHqzSXGRIepEM 3JuUEludrxnIGeVRrO7ehvy23eJuSqge9b3m/y5lmHeYmeifQpjc99llSQzCVqYOe+wdCLMKwrv zJDnFyWaP+Dt85mLtSFPV/ISsv5ICGSxsoeKOB9GEmgF10= X-Received: by 2002:a05:6402:4508:b0:65b:93ec:597a with SMTP id 4fb4d7f45d1cf-6619d4dde13mr6005801a12.19.1773164527524; Tue, 10 Mar 2026 10:42:07 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D (dynamic-046-114-165-086.46.114.pool.telefonica.de. [46.114.165.86]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-662a07022ebsm1708560a12.3.2026.03.10.10.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2026 10:42:07 -0700 (PDT) Message-ID: Subject: Re: Change initdb default to the builtin collation provider From: Laurenz Albe To: Jeff Davis , pgsql-hackers@postgresql.org Date: Tue, 10 Mar 2026 18:42:06 +0100 In-Reply-To: <47e1b4f72fe732c5ae85c6cf2c085b4e99a10120.camel@j-davis.com> References: <47e1b4f72fe732c5ae85c6cf2c085b4e99a10120.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2025-10-31 at 14:30 -0700, Jeff Davis wrote: > On Fri, 2025-10-10 at 17:48 -0700, Jeff Davis wrote: > > ------- > > Summary > > ------- > >=20 > > The libc collation provider is a bad default[1]. The builtin > > collation > > provider is a good default, so let's use that. >=20 > The attached patches implement a more modest proposal which does not > conflict with Peter's objection about the display order: >=20 > 0001: If the encoding is unspecified, and cannot be determined from the > locale (i.e. the locale is C), then use UTF-8 rather than SQL_ASCII. >=20 > 0002: If the provider is unspecified, and the locale is C or C.UTF-8, > then use the builtin provider. I think that would be an improvement, but I am still much more in favor of your original proposal to use the C collation by default. Peter objected: > I don't understand how it could be acceptable to just not provide > a good display order by default and have everyone rewrite their queries. I consider it acceptable. Oracle does it like that by default. Yes, Oracle's behavior is not necessarily what we want to emulate, but I don't remember hearing Oracle users complain about that (and I have heard them complain about other things). He also said: > I don't understand. We have a versioning system for ICU collations?=20 > Does it not work? Well, it works in that it alerts you that you may have index corruption. Good - but a default behavior that excludes the possibility of index corruption after an OS upgrade would work much better for most users. Yours, Laurenz Albe