News for hackers. Stuff that matters.
Re:PostgreSQL upgrades are hard by castorp on Saturday June 25, 2022 @06:39AM (#31874128)
You need to use pg_dump from the new version, not from the old version.
Re:PostgreSQL upgrades are hard by jasfi on Saturday June 25, 2022 @09:30AM (#31875160)
I think you found a common stumbling block. The tutorial people follow may say to run pg_dump and many people would assume you're running it from the old version.
Re:PostgreSQL upgrades are hard by rapind on Saturday June 25, 2022 @11:59AM (#31876287)
Wait, what? Explain please.

OK upon further thought, what you're saying is to use the pg_dump tool that comes with the pg version you are upgrading to.

I read it as "use pg_dump instead of pg_restore"...

Re:PostgreSQL upgrades are hard by mh- on Saturday June 25, 2022 @02:31PM (#31877557)
Yes. Put concisely: Use the client tools from the newest version involved for all steps.
Re:PostgreSQL upgrades are hard by oblio on Saturday June 25, 2022 @02:48PM (#31877675)
Isn't that impractical for most Linux distros? You'd need to manually install the new client.
Re:PostgreSQL upgrades are hard by BGZq7 on Saturday June 25, 2022 @03:14PM (#31877870)
On Debian (and probably most of its derivatives), the package manager will not remove any running PostgreSQL versions and will let you have multiple versions side by side. It also has its own tool pg_upgradecluster, which can perform the upgrade using pg_dump+pg_restore or pg_upgrade (optionally with link or clone options).
Re:PostgreSQL upgrades are hard by mh- on Saturday June 25, 2022 @02:52PM (#31877700)
Probably? Certainly if you rely on distro packaging for it, yes.

I was just trying to simplify the guidance here. :)

Re:PostgreSQL upgrades are hard by autra on Monday June 27, 2022 @07:28AM (#31893073)
Yes, and usually, it means you need to use the full binary path unfortunately (because debian wrappers embedded in the package select the version from your 5432 cluster).