Questions tagged [pg-upgrade]

pg_upgrade (formerly called pg_migrator) allows data stored in PostgreSQL data files to be upgraded to a later PostgreSQL major version without the data dump/reload typically required for major version upgrades, e.g. from 8.4.7 to the current major release of PostgreSQL. It is not required for minor version upgrades, e.g. from 9.0.1 to 9.0.4.

pg_upgrade (formerly called pg_migrator) allows data stored in PostgreSQL data files to be upgraded to a later PostgreSQL major version without the data dump/reload typically required for major version upgrades, e.g. from 8.4.7 to the current major release of PostgreSQL. It is not required for minor version upgrades, e.g. from 9.0.1 to 9.0.4.

Major PostgreSQL releases regularly add new features that often change the layout of the system tables, but the internal data storage format rarely changes. pg_upgrade uses this fact to perform rapid upgrades by creating new system tables and simply reusing the old user data files. If a future major release ever changes the data storage format in a way that makes the old data format unreadable, pg_upgrade will not be usable for such upgrades. (The community will attempt to avoid such situations.)

pg_upgrade does its best to make sure the old and new clusters are binary-compatible, e.g. by checking for compatible compile-time settings, including 32/64-bit binaries. It is important that any external modules are also binary compatible, though this cannot be checked by pg_upgrade.

pg_upgrade supports upgrades from 8.3.X and later to the current major release of PostgreSQL, including snapshot and alpha releases.

Source: http://www.postgresql.org/docs/9.2/static/pgupgrade.html

42 questions
1
vote
0 answers

pg_upgrade fails with errors upgrading from PostgreSQL 14 to 15

I'm trying to upgrade from postgre 14 to 15 following the Arch Linux wiki (https://wiki.archlinux.org/title/PostgreSQL#Upgrading_PostgreSQL). When I try to run pg_upgrade -b /opt/pgsql-14/bin -B /usr/bin -d /var/lib/postgres/olddata -D…
1
vote
1 answer

How to pg_upgrade with an User-defined Data-Directory

Running PostgreSQL on MANJARO, the actual /var/lib/postgres/data/postgresql.conf defines my Data-Directory: data_directory = '/mnt/Data/.../PostgreSQL' Now I'm facing the upgrade from PostgreSQL 13 to 14 and I'm thinking to use pg_upgrade, as…
StOMicha
  • 315
  • 1
  • 3
  • 12
1
vote
1 answer

Error: Consult the last few lines of "pg_upgrade_dump_1.log"

I wanted to ugrade my postgresql database from v10 to v14 I have run these commands in windows command prompt: C:\Users\mahajan>CD C:\Program Files\PostgreSQL\14\bin C:\Program Files\PostgreSQL\14\bin>SET PGPASSWORD =1234 pg_upgrade -d "c:\Program…
1
vote
1 answer

pg_upgrade from Postgresql-12 to Postgresql-13 fails with "Creating dump of database schemas postgres *failure*"

I've been stuck with this problem for more than a week now, and I hope someone could help me out here. I was running Postgresql 12 with PostGIS extension. I am trying to use the pg_upgrade function to upgrade the database to Postgresql 14. While…
CHOWY
  • 41
  • 5
1
vote
1 answer

postgres superuser issues during pg_upgrade

I'm using homebrew on Mac OSX to manage a postgres database. I'm trying to upgrade my postgres install from 11.9 to 13.0 using pg_upgrade. When I run pg_upgrade I get the following error about not being a superuser. If I try running as the…
havok2063
  • 517
  • 2
  • 9
  • 25
1
vote
0 answers

Postgres upgrade(10.9 to 12.2) is failing sporadically

Postgres upgrade(10.9 to 12.2) is failing sporadically We have upgraded postgres cluster from 10.5 to 12.2 10.5 version has also has extension lib PLV8. But we want to get rid of that extension in the upgraded version (12.2) Before upgrade, we have…
1
vote
1 answer

Issue in postgres upgrade from 11.1 to 11.6 using pg_upgrade

I'm trying to upgrade from one minor version (11.1) to another minor version (11.6) using the pg_upgrade tool but it is failing in the below command: su - postgres -c '/usr/pgsql-11/bin/pg_upgrade -d /opt/collabnet/teamforge/var/pgsql/11.1/data -D…
Ranjith
  • 13
  • 1
  • 8
1
vote
0 answers

PostgreSQL 10 => 11.1 pg_upgrade Postmaster Using Old Cluster

I seem to be caught between two operations, both pg_upgrade to change over the PostgreSQL major version, and pg_ctl to control the current postmaster control of the old cluster. [Sun Dec 30 09:29 rich@HQ /usr/local/var]…
Rich_F
  • 1,830
  • 3
  • 24
  • 45
1
vote
0 answers

pg_upgrade not transferring data to the new cluster

I was recently updating my postgres from 9.5 to 9.6.2 (installed with home-brew, though the old binaries were downloaded from postgresql directly), and I encountered a strange problem. I have been following this guide, and everything went okay. I…
rees
  • 11
  • 5
1
vote
0 answers

pg upgrade saving database definition taking time

I am in process of a pg_upgrade from 8.4 to 9.3. I am using this technique: http://momjian.us/main/writings/pgsql/pg_upgrade.pdf The upgrade has been running since 250 hours, and it has been on the step saving database definition since 160 hours.…
0
votes
1 answer

Upgrade a Postgres Database Using pg_ugrade Issues with pglogical

I have a Postgres database running on version 11. I want to upgrade to Postgres 14. This database also have logical replication set up using pglogical extension. when I run a compatibility check on both clusters, it fail pointing to pglogical…
Juvette M
  • 1
  • 1
  • 3
0
votes
0 answers

pg_upgrade port 50432 failed: fe_sendauth: no password supplied

I want to try my first upgrade from postgres 15.1 to 15.2 no instance is started,I run init on new dir: d:\_dev_\postgres\pgsql\bin\initdb.exe -D d:\_dev_\postgres\pgsql\data -U postgres -W -E UTF8 -A scram-sha-256 then I've create a cmd…
mrapi
  • 5,831
  • 8
  • 37
  • 57
0
votes
1 answer

why rsync command to postgres upgrade replica are duplicating data folder size increasing disc space

I'm following this doc https://www.postgresql.org/docs/current/pgupgrade.html to upgrade my cluster postgres an its replica, but when I run the rsync command, it duplicate the data folder, consuming all the disk space crashing the rsync. Here is the…
argdenis
  • 21
  • 4
0
votes
1 answer

Empty tables after pg_upgrade from v9.6 to v12

I used this command to upgrade the postgresql database from v9.6 to v12: /opt/rh/rh-postgresql12/root/usr/bin/pg_upgrade -b /opt/rh/rh-postgresql96/root/usr/bin/ -B /opt/rh/rh-postgresql12/root/usr/bin/ -d /var/opt/rh/rh-postgresql96/lib/pgsql/data…
M-E
  • 168
  • 4
  • 19
0
votes
1 answer

What is the location for pg_upgrade_dump log file?

I am trying to run a pg_upgrade on my existing 12.8 postgres and migrate it to 14.3 with docker based installation. I got the below error : Performing Upgrade ------------------ Analyzing all rows in the new cluster ok Freezing…
darecoder
  • 1,478
  • 2
  • 14
  • 29