Re: locale / encoding / meson cleanup

From: "Jonathan Gonzalez V(dot)" <jonathan(at)abdiel(dot)eu>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: locale / encoding / meson cleanup
Date: 2026-08-26 12:18:31
Message-ID: 87wltd2hyg.fsf@abdiel.eu
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> ...
> 1. test_regex_utf8 depends on the ctype, not just the encoding
> ...

I never run this test so it was a big surprise to me that after this:

PG_TEST_INITDB_EXTRA_OPTS='--no-locale --encoding=UTF8' meson test -C build/ --suite setup --suite test_regex

The error was there crystal clear! Tested patched 0001 and 0002 and now
the test pass and works perfectly on riscv64 and x86.

>
> 2. collate.linux.utf8 has never run on a meson build
>
> While checking whether anything else fails in a C+UTF8 database, I found that
> collate.linux.utf8 wasn't running on my build at all. Its guard includes
>
>     version() !~ 'linux-gnu'
>
> and meson builds don't produce that string:
>
>     meson     PostgreSQL 20devel on aarch64-linux, compiled by gcc-13.3.0,
> 64-bit
>     autoconf  PostgreSQL 20devel on aarch64-unknown-linux-gnu, compiled by gcc
> ...

I was able to reproduce the same issue with a riscv64 and x86, the patch
0003 was enough to fix the issue.

I've run a long test and found some errors, not related to this patch,
but will be triggered with the options:

PG_TEST_INITDB_EXTRA_OPTS='--no-locale --encoding=UTF8'

Don't know if are useful information but here is some information.

Test failed:

222/403 pg_dump - postgresql:pg_dump/010_dump_connstr ERROR 14.13s exit status 4
253/403 scripts - postgresql:scripts/200_connstr ERROR 4.18s exit status 3
294/403 subscription - postgresql:subscription/005_encoding ERROR 8.16s exit status 4

The tests failed because it's passing to initdb the `--encoding`
option twice and `--locale` and then `--no-locale` option, which is
weird, but that's clearly and error because of the extra options, not
related, to the patch, but it could be an issue in the farm since these
test are forcing a `--locale` and `--encoding` option. I think that it's
worth to keep these test in mind when testing

Regards,
--
Jonathan Gonzalez V.
EDB
https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-08-26 12:23:22 Re: Error handling in after-startup shmem requests
Previous Message Matt Blewitt 2026-08-26 12:14:16 Re: [PATCH] Fix JSON_SERIALIZE() coercion placeholder type for jsonb input