public inbox for [email protected]
help / color / mirror / Atom feedpg_upgrade: can I use same binary for old & new?
2+ messages / 2 participants
[nested] [flat]
* pg_upgrade: can I use same binary for old & new?
@ 2025-07-05 16:52 Pierre Fortin <[email protected]>
2025-07-05 17:04 ` Re: pg_upgrade: can I use same binary for old & new? Tom Lane <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Pierre Fortin @ 2025-07-05 16:52 UTC (permalink / raw)
To: [email protected]
Hi,
[Hope this gets through after dumping DKIM-ignorant mail provider.]
Wanting to upgrade from:
PostgreSQL 15.13 on x86_64-mageia-linux-gnu,
compiled by gcc (Mageia 15.1.0-1.mga10) 15.1.0, 64-bit
to:
PG 17.5
Way back, I was able to use -k|--link option on pg_upgrade (PG13 to PG15);
but since then:
- my DB has grown to over 8TB
- even with ~70TB, I don't have enough contiguous disk space to
dump/restore
- my Linux distro (Mageia) is not setup to handle multiple versions of
postgres (installing 17.5 removes 15.13). Worse, it failed to install
part of the module when it saw /var/lib/pgsql/data still there:
https://bugs.mageia.org/show_bug.cgi?id=34306
I've glanced at the pg_upgrade source code (my C skills are ancient) and
it appears pg_upgrade is virtually the same from 15.13 to 17.5.
My question: did I miss anything, or would:
$ pg_upgrade -d data15 -D data17 -k
suffice?
Besides not noticing significant difference between the two versions, the
docs at https://www.postgresql.org/docs/current/pgupgrade.html
contain: "default is the directory where pg_upgrade resides"
If new pg_upgrade is the only binary, will both -b and -B default to it?
Maybe at minimum I may need to specify:
$ pg_upgrade -b /usr/bin -d data15 -D data17 -k
?
Thanks,
Pierre
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pg_upgrade: can I use same binary for old & new?
2025-07-05 16:52 pg_upgrade: can I use same binary for old & new? Pierre Fortin <[email protected]>
@ 2025-07-05 17:04 ` Tom Lane <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2025-07-05 17:04 UTC (permalink / raw)
To: Pierre Fortin <[email protected]>; +Cc: [email protected]
Pierre Fortin <[email protected]> writes:
> - my Linux distro (Mageia) is not setup to handle multiple versions of
> postgres (installing 17.5 removes 15.13).
Ugh. You cannot do pg_upgrade without a copy of the old postgres
server binary as well as the new one. pg_upgrade by itself is not
capable of accessing either set of catalogs.
Way back when I was packaging PG for Red Hat, they didn't support
multiple concurrently-installed package versions either, so what I did
was to provide an auxiliary pg_upgrade package that contained an old
server binary as well as pg_upgrade itself. Perhaps Mageia has done
something similar, or could be cajoled to once you point out that
their packaging makes it impossible to do an upgrade.
If that path yields no joy, you'll need to use a hand-built copy of
one PG version or the other while performing the upgrade. Might want
to think about migrating to some less PG-unfriendly distro while
you are at it.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-07-05 17:04 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-05 16:52 pg_upgrade: can I use same binary for old & new? Pierre Fortin <[email protected]>
2025-07-05 17:04 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox