On 29 July 2017 at 11:12, Alan McKinnon <alan.mckin...@gmail.com> wrote:

> On 29/07/2017 11:59, Mick wrote:
> > It seems this is one of these things I keep forgetting how to perform
> > correctly, despite taking notes and reading the documentation.  I
> thought I
> > had upgraded postgresql from 9.5.7 to 9.6.3-r1 a couple of weeks ago.
> >
> > Today depclean asked me to remove 9.5.7 and after a moment's hesitation
> I went
> > along with it.  To my surprise I got this at the end of it:
> >
> > [snip...]
> > <<<          dir /usr/include/postgresql-9.5/server/catalog
> > <<<          dir /usr/include/postgresql-9.5/server/bootstrap
> > <<<          dir /usr/include/postgresql-9.5/server/access
> > <<<          dir /usr/include/postgresql-9.5/server
> > <<<          dir /usr/include/postgresql-9.5/libpq
> > <<<          dir /usr/include/postgresql-9.5/internal/libpq
> > <<<          dir /usr/include/postgresql-9.5/internal
> > <<<          dir /usr/include/postgresql-9.5/informix/esql
> > <<<          dir /usr/include/postgresql-9.5/informix
> > <<<          dir /usr/include/postgresql-9.5
> > --- !empty   dir /usr/include
> > --- !empty   dir /usr/bin
> > --- !empty   dir /usr
> > --- !empty   dir /etc/postgresql-9.5
> > --- !empty   dir /etc/pam.d
> > --- !empty   dir /etc/init.d
> > --- !empty   dir /etc/conf.d
> > --- !empty   dir /etc
> > Unsetting 9.5 as default...done.
> > Setting 9.6 as the default...ln: failed to create symbolic link
> > '/usr/include/libpq-fe.h': File exists
> > !!! Error: Unable to create link! postgresql-9.6/libpq-fe.h ->
> > /usr/include/libpq-fe.h
> > exiting
> >>>> Regenerating /etc/ld.so.cache...
> > Packages installed:   1321
> > Packages in world:    216
> > Packages in system:   44
> > Required packages:    1321
> > Number removed:       1
> >
> >
> > Looking at /usr/include/ I see this:
> >
> > lrwxrwxrwx   1 root root     29 Jul 16 13:56 postgres_ext.h ->
> > postgresql-9.5/postgres_ext.h
> > lrwxrwxrwx   1 root root     14 Jul 29 10:34 postgresql -> postgresql-9.6
> > drwxr-xr-x   6 root root   4096 Jul 16 13:55 postgresql-9.6
> >
> > Although the old /usr/include/postgresql-9.5 directory and file
> postgres_ext.h
> > have been removed, the symlink is still pointint to the old file, rather
> than
> > having been replaced with a symlink to
> > /usr/include/postgresql-9.6/postgres_ext.h:
> >
> > $ ls -la /usr/include/postgresql-9.6/postgres_ext.h
> > -rw-r--r-- 1 root root 2151 Jul 16 13:54
> > /usr/include/postgresql-9.6/postgres_ext.h
> >
> >
> > I'm trying to understand why this might have happened.  Which
> process/action
> > is responsible for setting this symlink?
> >
> > Also, the entry run by depclean above also confused me:
> >
> > Unsetting 9.5 as default...done.
> > Setting 9.6 as the default...
> >
> > How is the default version of postgresql being set in a system?  What
> specific
> > actions do these two entries entail?  I thought with openrc at least it
> is a
> > matter of setting up the latest postgresql version to start up in
> rc-update.
> >
> > I've replaced the symlink with the live postgresql manually for now - I
> hope I
> > haven't borked the database ...
> >
>
>
> postgresql is slotted, so various headers files and such need symlinks
> installed so postgresql uses the correct versioned file. You have 2
> versions, which one is correct? - the one the symlink points to.
>
> Yes, but what confused me is that this symlink was correct:

 postgresql -> postgresql-9.6

while all others weren't.


> Installing 9.6 on a host with 9.5 present does only that - installs it.
> It doesn't run it or set it as default, it only installs it. To run it
> or set it as default is an extra step that you decide yourself when you
> want to do it.
>
> depcleaning 9.5 removes the default version, so the obvious thing for
> the code to do is set 9.6 as the new default. Maybe the ebuild does it,
> maybe it's eselect. Doesn't matter, because something should have
> removed those stale symlinks and didn't. This is a reportable bug
>
> Right, I would report it, except I can't recall if I ran eselect after
isntalling 9.6. ... I am *almost* sure I did.


> Meanwhile fix the symlinks to what they should be using "ln -sfn" and
> all will be good in the world.
>
> --
> Alan McKinnon
> alan.mckin...@gmail.com
>
> Thanks Alan, I was hoping this would be the case.  However, the blasted
akonadi, which is why I am running a database on a laptop in the first
place, refuses to start:

[11:34:27] ~ $ akonadictl start
Starting Akonadi Server...
   done.
Connecting to deprecated signal
QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
[11:34:38] ~ $ QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QPSQL7 QPSQL
Invalid database object during initial database connection
"[
0: akonadiserver(_Z11akBacktracev+0x4a) [0x463ada]
1: akonadiserver() [0x463dab]
2: /lib64/libc.so.6(+0x33170) [0x7f454d39d170]
3: /lib64/libc.so.6(gsignal+0x38) [0x7f454d39d0e8]
4: /lib64/libc.so.6(abort+0x16a) [0x7f454d39e53a]
5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8d)
[0x7f454ec90e1d]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xad) [0x465fbd]
7: /usr/lib64/qt4/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0xa7)
[0x7f454ed333d7]
8: /usr/lib64/qt4/libQtCore.so.4(+0x120166) [0x7f454ed41166]
9: /usr/lib64/qt4/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x31) [0x7f454ed4abe1]
10:
akonadiserver(_ZN7Akonadi6Server13AkonadiServer14createDatabaseEv+0x163)
[0x468433]
11: akonadiserver(_ZN7Akonadi6Server13AkonadiServer4initEv+0xc75) [0x46a635]
12: akonadiserver() [0x54c579]
13: /usr/lib64/qt4/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x1d1)
[0x7f454edc5581]
14:
/usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8d)
[0x7f454edab7ad]
15:
/usr/lib64/qt4/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x376)
[0x7f454edaec36]
16: /usr/lib64/qt4/libQtCore.so.4(+0x1ba8ee) [0x7f454eddb8ee]
17: /usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x24d)
[0x7f454ca693bd]
18: /usr/lib64/libglib-2.0.so.0(+0x4a6a0) [0x7f454ca696a0]
19: /usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c)
[0x7f454ca6974c]
20:
/usr/lib64/qt4/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x7e)
[0x7f454eddba5e]
21:
/usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x41)
[0x7f454edaa021]
22:
/usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x1b5)
[0x7f454edaa395]
23: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x99)
[0x7f454edafd39]
24: akonadiserver(main+0x2c9) [0x45ece9]
25: /lib64/libc.so.6(__libc_start_main+0xf0) [0x7f454d38a640]
26: akonadiserver(_start+0x29) [0x45f5a9]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255
(Unknown error)
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QPSQL7 QPSQL
Invalid database object during initial database connection
"[
0: akonadiserver(_Z11akBacktracev+0x4a) [0x463ada]
[snip ..]

ProcessControl: Application 'akonadiserver' returned with exit code 255
(Unknown error)
"akonadiserver" crashed too often and will not be restarted!


So what is this "Invalid database object during initial database
connection" and how to fix it.  :-(

-- 
Regards,
Mick

Reply via email to