View previous topic :: View next topic |
Author |
Message |
iandoug l33t
Joined: 11 Feb 2005 Posts: 810 Location: Cape Town, South Africa
|
Posted: Thu Oct 08, 2015 6:38 pm Post subject: Recovering from depclean wiping active postgres |
|
|
hi
emerge --depclean wiped my active postgres.
I'm trying to follow the wiki on migrating from 9.3 to 9.4, but this command
Code: |
pg_upgrade -U postgres -d /var/lib/postgresql/9.3/data -D /var/lib/postgresql/9.4/data -b /usr/lib/postgresql-9.3/bin -B /usr/lib/postgresql-9.4/bin
|
fails because depclean has wiped the 9.3/bin folder.
I'm left with
Code: |
$ locate postgresql-9.3
/etc/postgresql-9.3
/etc/postgresql-9.3/pg_hba.conf
/etc/postgresql-9.3/pg_ident.conf
/etc/postgresql-9.3/postgresql.conf
/etc/runlevels/default/postgresql-9.3
(and stuff in portage)
|
Is is safe to just rename 9.3/data to 9.4/data?
I've never had to update postgres before, and the mysql methodology is far more simpler and automated.
Suggestions as to how to proceed gratefully received
thanks, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8931
|
Posted: Thu Oct 08, 2015 6:51 pm Post subject: |
|
|
If you need postgresql-9.3 to migrate old DBs, then emerge it. The upgrade assumes that 9.3 is still there after you installed 9.4. |
|
Back to top |
|
|
iandoug l33t
Joined: 11 Feb 2005 Posts: 810 Location: Cape Town, South Africa
|
Posted: Thu Oct 08, 2015 7:11 pm Post subject: |
|
|
genstorm wrote: | If you need postgresql-9.3 to migrate old DBs, then emerge it. The upgrade assumes that 9.3 is still there after you installed 9.4. |
Thanks, I figured I would need to do that. Will give it a shot later (busy working atm)
cheers, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
iandoug l33t
Joined: 11 Feb 2005 Posts: 810 Location: Cape Town, South Africa
|
Posted: Fri Oct 09, 2015 1:50 am Post subject: |
|
|
genstorm wrote: | If you need postgresql-9.3 to migrate old DBs, then emerge it. The upgrade assumes that 9.3 is still there after you installed 9.4. |
pg_upgrade was going well until
Code: |
lc_collate cluster values do not match: old "en_ZA.UTF-8", new "C"
Failure, exiting
|
Can't find where to set lc_collate, it seems to be passed as command line parameter when creating database, (as example in arch linux wiki), but Gentoo does
Code: |
Then, execute the following command to setup the initial database
* environment:
* emerge --config =dev-db/postgresql-9.4.4
|
and I can't find where else to set lc_collate....
I have
Code: |
# cat /etc/env.d/02locale
LANG="en_ZA.UTF-8"
LC_COLLATE="C"
|
but can't remember when last I edited that file... and howcome 9.3 has en_ZA.UTF-8.
Should I just edit 02locale and rerun emerge --config =dev-db/postgresql-9.4.4 ?
thanks, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
iandoug l33t
Joined: 11 Feb 2005 Posts: 810 Location: Cape Town, South Africa
|
Posted: Sat Oct 10, 2015 9:13 pm Post subject: |
|
|
iandoug wrote: |
Should I just edit 02locale and rerun emerge --config =dev-db/postgresql-9.4.4 ?
|
Yes.
1. edit 02locale
2. re-emerge 9.4.4
3. emerge --config as above
4. su - postgres
5. pg_upgrade -U postgres -d /var/lib/postgresql/9.3/data -D /var/lib/postgresql/9.4/data -b /usr/lib/postgresql-9.3/bin -B /usr/lib/postgresql-9.4/bin _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|