Gentoo Archives: gentoo-user

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

Attachments

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