Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Postgresql upgrade
Date: Sat, 29 Jul 2017 10:00:11
Message-Id: 2044129.0rag0cr0Z0@dell_xps
1 It seems this is one of these things I keep forgetting how to perform
2 correctly, despite taking notes and reading the documentation. I thought I
3 had upgraded postgresql from 9.5.7 to 9.6.3-r1 a couple of weeks ago.
4
5 Today depclean asked me to remove 9.5.7 and after a moment's hesitation I went
6 along with it. To my surprise I got this at the end of it:
7
8 [snip...]
9 <<< dir /usr/include/postgresql-9.5/server/catalog
10 <<< dir /usr/include/postgresql-9.5/server/bootstrap
11 <<< dir /usr/include/postgresql-9.5/server/access
12 <<< dir /usr/include/postgresql-9.5/server
13 <<< dir /usr/include/postgresql-9.5/libpq
14 <<< dir /usr/include/postgresql-9.5/internal/libpq
15 <<< dir /usr/include/postgresql-9.5/internal
16 <<< dir /usr/include/postgresql-9.5/informix/esql
17 <<< dir /usr/include/postgresql-9.5/informix
18 <<< dir /usr/include/postgresql-9.5
19 --- !empty dir /usr/include
20 --- !empty dir /usr/bin
21 --- !empty dir /usr
22 --- !empty dir /etc/postgresql-9.5
23 --- !empty dir /etc/pam.d
24 --- !empty dir /etc/init.d
25 --- !empty dir /etc/conf.d
26 --- !empty dir /etc
27 Unsetting 9.5 as default...done.
28 Setting 9.6 as the default...ln: failed to create symbolic link
29 '/usr/include/libpq-fe.h': File exists
30 !!! Error: Unable to create link! postgresql-9.6/libpq-fe.h ->
31 /usr/include/libpq-fe.h
32 exiting
33 >>> Regenerating /etc/ld.so.cache...
34 Packages installed: 1321
35 Packages in world: 216
36 Packages in system: 44
37 Required packages: 1321
38 Number removed: 1
39
40
41 Looking at /usr/include/ I see this:
42
43 lrwxrwxrwx 1 root root 29 Jul 16 13:56 postgres_ext.h ->
44 postgresql-9.5/postgres_ext.h
45 lrwxrwxrwx 1 root root 14 Jul 29 10:34 postgresql -> postgresql-9.6
46 drwxr-xr-x 6 root root 4096 Jul 16 13:55 postgresql-9.6
47
48 Although the old /usr/include/postgresql-9.5 directory and file postgres_ext.h
49 have been removed, the symlink is still pointint to the old file, rather than
50 having been replaced with a symlink to
51 /usr/include/postgresql-9.6/postgres_ext.h:
52
53 $ ls -la /usr/include/postgresql-9.6/postgres_ext.h
54 -rw-r--r-- 1 root root 2151 Jul 16 13:54
55 /usr/include/postgresql-9.6/postgres_ext.h
56
57
58 I'm trying to understand why this might have happened. Which process/action
59 is responsible for setting this symlink?
60
61 Also, the entry run by depclean above also confused me:
62
63 Unsetting 9.5 as default...done.
64 Setting 9.6 as the default...
65
66 How is the default version of postgresql being set in a system? What specific
67 actions do these two entries entail? I thought with openrc at least it is a
68 matter of setting up the latest postgresql version to start up in rc-update.
69
70 I've replaced the symlink with the live postgresql manually for now - I hope I
71 haven't borked the database ...
72 --
73 Regards,
74 Mick

Attachments

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

Replies

Subject Author
[gentoo-user] Re: Postgresql upgrade Mick <michaelkintzios@×××××.com>
Re: [gentoo-user] Postgresql upgrade Alan McKinnon <alan.mckinnon@×××××.com>