Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How do you upgrade postgresql?
Date: Sat, 13 Feb 2016 17:17:12
Message-Id: 3486013.KHNGOss8GC@dell_xps
In Reply to: Re: [gentoo-user] How do you upgrade postgresql? by "J. Roeleveld"
1 On Saturday 13 Feb 2016 17:12:27 J. Roeleveld wrote:
2 > On 13 February 2016 15:40:33 CET, Michael Orlitzky <mjo@g.o> wrote:
3 > >On 02/13/2016 09:04 AM, Mick wrote:
4 > >> Hi All,
5 > >>
6 > >> How would you suggest I upgrade dev-db/postgresql-9.4.5-r2 to 9.5.1?
7 > >>
8 > >> I read here that dump and restore is probably a cleaner way to
9 > >
10 > >upgrade gentoo
11 > >
12 > >> based installations, rather than using the pg_dump and pg_restore
13 > >
14 > >commands:
15 > >
16 > >
17 > >http://michael.orlitzky.com/articles/upgrading_postgresql-9.x_on_gentoo.php
18 > >
19 > >
20 > >Haha, yes, I remember that. I stand by the note at the top.
21 > >
22 > >You can install 9.5 side-by-side with 9.4. That gives you time to look
23 > >over the configuration for 9.5 while 9.4 is still running. Then when
24 > >you're ready, run pg_dump/pg_dumpall to back everything up. Stop 9.4,
25 > >eselect 9.5, start 9.5, and then run pg_restore or psql < backup.sql to
26 > >load all of the data. It's fast, conceptually simple, and minimizes the
27 > >downtime.
28 > >
29 > >When you're sure it works, don't forget to remove 9.4 from the default
30 > >runlevel and add 9.5 so that you're not surprised on a reboot.
31 >
32 > Or run both simultaneously on different ports and migrate one
33 > database/application at a time.
34 >
35 > That will also allow you to dump/restore directly without requiring
36 > additional diskspace.
37 >
38 > --
39 > Joost
40
41 Thank you both, I used pg_dumpall, but when I tried to restore it with
42
43 psql -f postgress_20160213 postgres
44
45 it complained that user 'michael' doesn't exist. Then tried logged in as
46 root, whereby it complained that user 'root' doesn't exist. Then I 'su -
47 postgres' and it restored the database. Is this how I am supposed to restore
48 from a backup?
49
50 I only run postgres for KDEPIM's akonadi, which seems to work fine post-
51 upgrade. :-)
52
53 --
54 Regards,
55 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] How do you upgrade postgresql? Michael Orlitzky <mjo@g.o>