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 1vdpIG-005IPM-2R for pgsql-general@arkaria.postgresql.org; Thu, 08 Jan 2026 12:39:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdpIF-001uR7-1k for pgsql-general@arkaria.postgresql.org; Thu, 08 Jan 2026 12:39: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 1vdpDx-001sRf-0U for pgsql-general@lists.postgresql.org; Thu, 08 Jan 2026 12:34:45 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vdpDv-005H6G-2N for pgsql-general@postgresql.org; Thu, 08 Jan 2026 12:34:45 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-59b6d5bd575so2307920e87.1 for ; Thu, 08 Jan 2026 04:34:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767875683; x=1768480483; darn=postgresql.org; h=content-language:to:subject:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=gmNcPrDD7iLuhrjJK3c3tLOuGjEX/TPQetvP3R+75gI=; b=jv0UmJAxC+UzBUsUDYo2aPNF+nTPrshk800Nx9obX9ym9/jUaz/enHh6Jo6XGLiEbD 7BCCujVOzS9v2CBpX9JTeUqQvt0v8rrUKe8pv5Z1SyaQny7YdeW5BTYqhH7tvCzIuyvv IyMtyVM63+8GDHPCcZFluoDXSHTfxIcHY4Ij+BYbRIAp2Hg37zHcPUWYLlR821+2hhCu +C7WD83SL1W0D0ccfMlZf1cGvw1rMAP5ORK0jM4etVwSHZQCPxYWuRgsHhOjzJjPeM4G UakmWYGOZQPaIVSx5J/01a0UWW9hmbCAcLB5v71tXdZjzQ0HiY/XEBWmhu97LzR5stk8 eKPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767875683; x=1768480483; h=content-language:to:subject:from:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gmNcPrDD7iLuhrjJK3c3tLOuGjEX/TPQetvP3R+75gI=; b=drnn/URKvhOcxyDWehdxtV+H//PBsoAAbQjtUFMPrahNoWlB/86rYRuVB7RKxBwy1m AUQOzjCYdOkZXiKzobmiSbuAMRC8mwXaTcqdmd4bqTG43aJZGDvd/xVR0rYuIcXr7v6N YvjzDETBocobTw2Ne2xi5BbcIM0CWR0Z+lfFKFEfG0wsVGis6chNvDwQNNrzluqm+XTx 82lLYfH1IraoAosDUuShI1/DzA/ET/zPYVFDwluTJNyP0QMHj1q+zbUmu0agyUG7OBh7 Etgl/omEX0drqML1IrhqRLrfvoezVd5om3i/bvL7yLw0j5HDpUtk3wYtRH2Q5UYKW3Xx EAYA== X-Gm-Message-State: AOJu0Ywo9SQdu8l6gJKS7bN0jW6WpRYUt80ExbN674k91x7W9/rfZ6OO AnHiME0Ctj4z6g5tyyEoAQwIFwQzgDksyDp9TagUDIx4WYSrBvbw6B519gd9Gw== X-Gm-Gg: AY/fxX5R8N7Mki/tvxE/HEOJ6CrobZ2MczaPRWFL7omqT+tY2U6rVms1e+DK1brO7TD Ge5N354iNjYPRyqgOMuYTGZWZZBjXsVV/ic+T84MycxLgignCUihfGbViOe9E36HHujpbZMfuG6 CPg4cFn9fD56D4yL6TXt5CvqrCv+hPLC8XLveg9tnWfS5PCnro25HQjA5qJNbMto/me3BJ6w0zw p0VJXTVYoZXy2Bp+g9+pNI1ug7SXOVY++/miJSIRrRE2u4dXiN7odAdd55blZH141aQuJawrBf4 G17zSCLj0SKnSFlrcTGLoY8U6+5sNnStdwMsvdeKO9quQ/MxHOQdvD2dTJR+lpnmBTiUDTA0Cbd QsbWWIhrI+whjgZGp5R5GjWtqAd2jfejDRZzMk/dwJkIpzuEc36i+4AFMQ1bBzpm46O2+fl48nt 6zcDFYTryqHD/y2iuQ8WQ= X-Google-Smtp-Source: AGHT+IGzftqYwjjeObBxiFSqkI/O6wtx2RUvph+7MVeMAP58ZcyUKeAtewV0Qeq6OdqywqD0dy7KqA== X-Received: by 2002:a05:6512:3d05:b0:59b:6d59:1e82 with SMTP id 2adb3069b0e04-59b6ed1343amr1986296e87.9.1767875682991; Thu, 08 Jan 2026 04:34:42 -0800 (PST) Received: from [192.168.1.37] ([85.132.53.122]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59b6d189750sm1403651e87.81.2026.01.08.04.34.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Jan 2026 04:34:42 -0800 (PST) Content-Type: multipart/alternative; boundary="------------4LmsFseVFRdOgL7bSYZVydeF" Message-ID: <200eccb1-188e-49ee-9360-c3a7acb19c2c@gmail.com> Date: Thu, 8 Jan 2026 16:34:40 +0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Rihad Subject: Collation again here To: pgsql-general General Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------4LmsFseVFRdOgL7bSYZVydeF Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, guys. Just pg_upgraded our PG from 13.x to 18.1, rebuilt all indexes concurrently and issued ALTER DATABASE foo REFRESH COLLATION VERSION Everything's fine on the master server, no warnings etc. Then I set up a replica using pg_basebackup, and there when trying to access the DB using psql I get: WARNING:  database "foo" has a collation version mismatch DETAIL:  The database was created using collation version 43.0, but the operating system provides version 34.0. HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE foo REFRESH COLLATION VERSION, or build PostgreSQL with the right library version. psql (18.1) Type "help" for help. (and I can't issue those same commands on the read-only replica). The OS are both FreeBSD, but the master runs 14.3, the replica runs 13.5. PostgreSQL packages are built with ICU support by default, the versions used are identical: icu-76.1 Could it be that the OS (libc) needs to be the same version? I hoped it would be enough to use the same ICU. Thanks for any tips. --------------4LmsFseVFRdOgL7bSYZVydeF Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi, guys. Just pg_upgraded our PG from 13.x to 18.1, rebuilt all indexes concurrently and issued  ALTER DATABASE foo REFRESH COLLATION VERSION

Everything's fine on the master server, no warnings etc. Then I set up a replica using pg_basebackup, and there when trying to access the DB using psql I get:


WARNING:  database "foo" has a collation version mismatch
DETAIL:  The database was created using collation version 43.0, but the operating system provides version 34.0.
HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE foo REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
psql (18.1)
Type "help" for help.


(and I can't issue those same commands on the read-only replica).


The OS are both FreeBSD, but the master runs 14.3, the replica runs 13.5. PostgreSQL packages are built with ICU support by default, the versions used are identical:  icu-76.1


Could it be that the OS (libc) needs to be the same version? I hoped it would be enough to use the same ICU.


Thanks for any tips.

--------------4LmsFseVFRdOgL7bSYZVydeF--