Re: Do we still need MULE_INTERNAL?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: thomas(dot)munro(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: Do we still need MULE_INTERNAL?
Date: 2026-04-01 15:33:04
Message-ID: 790a2e194c2d8cb03a2f1b8b580b64f25a5095b0.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2026-04-01 at 08:38 +0900, Tatsuo Ishii wrote:
> In my case pg_upgrade does not fail.
>
> Old clsuter:
> - create pg18 cluster with SQL_ASCII encoding
> - create MULE_INTERNAL encoding database
> - drop the MULE_INTERNAL database
>
> New cluster:
> - create pg19dev cluster with SQL_ASCII encoding
>
> Run pg_upgrade

Repro of my case:

cd pgsql18dbg
./bin/initdb -D data -N -E MULE_INTERNAL --locale=C
./bin/pg_ctl -D data -l logfile start
PGCLIENTENCODING=SQL_ASCII ./bin/psql postgres \
-c 'create table x(t text);'
./bin/pg_ctl -D data stop
cd ../pgsql19dbg
./bin/initdb -D data -N -E SQL_ASCII --locale=C
./bin/pg_upgrade -b ../pgsql18dbg/bin -B bin \
-d ../pgsql18dbg/data -D data

===========================
...
Performing Upgrade
------------------
...
Setting frozenxid and minmxid counters in new cluster
connection to server on socket ".../pgsql19dbg/.s.PGSQL.50432" failed:
FATAL: invalid database encoding: 7

Failure, exiting
===========================

It's easy to fix by just rejecting MULE_INTERNAL during the "check"
phase.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2026-04-01 15:34:56 Minor cleanup of Meson files given that we require 0.57
Previous Message Nathan Bossart 2026-04-01 15:24:40 Re: vectorized CRC on ARM64