From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: pg_upgrade: Fix inconsistency in memory freeing |
Date: | 2025-03-29 22:03:01 |
Message-ID: | Z-huFcVLtZVp2q51@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Sat, Mar 29, 2025 at 09:24:58AM -0700, Jeff Davis wrote:
> This seems to have broken the pg_upgrade test when olddump/oldinstall
> are set to PG14 or earlier:
>
> stderr:
> # Failed test 'check that locales in new cluster match original
> cluster'
> # at
> /home/jdavis/git/postgresql/src/bin/pg_upgrade/t/002_pg_upgrade.pl line
> 506.
> # got: '0|c|C|C|NULL'
> # expected: '0|c|C|C|'
> # Looks like you failed 1 test of 16.
>
> Looking at the commit, it seems you are escaping NULL as a literal.
Thanks for the report. It would be possible to switch to a second
approach here, where we use pg_free() if we don't have a
locale->db_locale to make sure that the memory is freed in its correct
context, like in the attached. What do you think?
This test has been added in v16 via 9637badd9f92, with the buildfarm
not complaining. Could it be possible to improve the situation so as
we would know about 002_pg_upgrade.pl failing for such cross-upgrades
like what you are doing here?
--
Michael
Attachment | Content-Type | Size |
---|---|---|
upgrade-free-locale.patch | text/x-diff | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2025-03-30 12:13:04 | pgsql: Remove incidental md5() function use from test |
Previous Message | Andres Freund | 2025-03-29 20:50:59 | pgsql: localbuf: Track pincount in BufferDesc as well |