Thread: pg_upgrade and ubuntu
I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade the default ubuntu package, and the one from postgresql.org, both store `postgresql.conf` in etc as `/etc/postgresql/VERSION/main/postgresql.conf` however, the pg_upgrade script expects it in the `datadir`. the simple solution seems to be just symlinking the /etc files into the data dirs. it took me a while to realize this was the error. it might make sense to upgrade the docs with a note about what should be in the data dir to enable an upgrade.
Jonathan Vanasco-7 wrote > I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade > > the default ubuntu package, and the one from postgresql.org, both store > `postgresql.conf` in etc as `/etc/postgresql/VERSION/main/postgresql.conf` > > however, the pg_upgrade script expects it in the `datadir`. > > the simple solution seems to be just symlinking the /etc files into the > data dirs. > > it took me a while to realize this was the error. > > it might make sense to upgrade the docs with a note about what should be > in the data dir to enable an upgrade. https://wiki.postgresql.org/wiki/Using_pg_upgrade_on_Ubuntu/Debian It would make more sense for the Debian packagers people to write a pg_upgradecluster wrapper like they have done for the other key programs. David J. -- View this message in context: http://postgresql.nabble.com/pg-upgrade-and-ubuntu-tp5827035p5827039.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On 11/14/2014 11:10 AM, Jonathan Vanasco wrote: > I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade > > the default ubuntu package, and the one from postgresql.org, both store `postgresql.conf` in etc as `/etc/postgresql/VERSION/main/postgresql.conf` > > however, the pg_upgrade script expects it in the `datadir`. > > the simple solution seems to be just symlinking the /etc files into the data dirs. > > it took me a while to realize this was the error. > > it might make sense to upgrade the docs with a note about what should be in the data dir to enable an upgrade. I believe there is: http://www.postgresql.org/docs/9.3/interactive/pgupgrade.html Notes "If you are upgrading a pre-PostgreSQL 9.2 cluster that uses a configuration-file-only directory, you must pass the real data directory location to pg_upgrade, and pass the configuration directory location to the server, e.g. -d /real-data-directory -o '-D /configuration-directory'." > > > > -- Adrian Klaver adrian.klaver@aklaver.com
David G Johnston wrote > > Jonathan Vanasco-7 wrote >> I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade >> >> the default ubuntu package, and the one from postgresql.org, both store >> `postgresql.conf` in etc as >> `/etc/postgresql/VERSION/main/postgresql.conf` >> >> however, the pg_upgrade script expects it in the `datadir`. >> >> the simple solution seems to be just symlinking the /etc files into the >> data dirs. >> >> it took me a while to realize this was the error. >> >> it might make sense to upgrade the docs with a note about what should be >> in the data dir to enable an upgrade. > https://wiki.postgresql.org/wiki/Using_pg_upgrade_on_Ubuntu/Debian > > It would make more sense for the Debian packagers people to write a > pg_upgradecluster wrapper like they have done for the other key programs. > > David J. Note it appears there is a pg_upgradecluster program, but it doesn't appear to a wrapper for the official program... David J. -- View this message in context: http://postgresql.nabble.com/pg-upgrade-and-ubuntu-tp5827035p5827041.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
David G Johnston wrote: > David G Johnston wrote > > It would make more sense for the Debian packagers people to write a > > pg_upgradecluster wrapper like they have done for the other key programs. > > Note it appears there is a pg_upgradecluster program, but it doesn't appear > to a wrapper for the official program... As far as I recall, pg_upgradecluster goes through a pg_dump / pg_restore cycle. It predates pg_upgrade itself. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
David G Johnston wrote > > David G Johnston wrote >> >> Jonathan Vanasco-7 wrote >>> I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade >>> >>> the default ubuntu package, and the one from postgresql.org, both store >>> `postgresql.conf` in etc as >>> `/etc/postgresql/VERSION/main/postgresql.conf` >>> >>> however, the pg_upgrade script expects it in the `datadir`. >>> >>> the simple solution seems to be just symlinking the /etc files into the >>> data dirs. >>> >>> it took me a while to realize this was the error. >>> >>> it might make sense to upgrade the docs with a note about what should be >>> in the data dir to enable an upgrade. >> https://wiki.postgresql.org/wiki/Using_pg_upgrade_on_Ubuntu/Debian >> >> It would make more sense for the Debian packagers people to write a >> pg_upgradecluster wrapper like they have done for the other key programs. >> >> David J. > Note it appears there is a pg_upgradecluster program, but it doesn't > appear to a wrapper for the official program... > > David J. <should finish skimming before I post things....> Anyway, without self verification, it appears from here: https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/939260 that you can instruct pg_upgradecluster to use the official program to do the upgrade instead of its old method - whatever that was... David J. -- View this message in context: http://postgresql.nabble.com/pg-upgrade-and-ubuntu-tp5827035p5827044.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
On 11/14/14 2:10 PM, Jonathan Vanasco wrote: > I ran into an issue migrating from 9.1 to 9.3 on ubuntu using pg_upgrade > > the default ubuntu package, and the one from postgresql.org, both store `postgresql.conf` in etc as `/etc/postgresql/VERSION/main/postgresql.conf` > > however, the pg_upgrade script expects it in the `datadir`. > > the simple solution seems to be just symlinking the /etc files into the data dirs. > > it took me a while to realize this was the error. > > it might make sense to upgrade the docs with a note about what should be in the data dir to enable an upgrade. On Debian/Ubuntu, use pg_upgradecluster --method upgrade. See the man page for details.