Re: Problems invoking psql, was: Re: Troubles at

From: Hugh Esco <hesco(at)greens(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Problems invoking psql, was: Re: Troubles at
Date: 2002-11-25 06:58:11
Message-ID: 5.1.0.14.0.20021125015006.033bede0@petra.cagreens.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Oliver Elphick asked:
>What have you got in /var/lib/dpkg/diversions?

Here is my preliminary answer, plus a question of my own:
>biko:/var/lib/dpkg# ls -al | grep diversions
>-rw-r--r-- 1 root root 361825 Nov 21 18:48 diversions
>-rw-r--r-- 1 root root 361931 Nov 21 18:48 diversions-old
>biko:/var/lib/dpkg# wc diversions
> 8841 43017 361825 diversions
>biko:/var/lib/dpkg# cat diversions | grep Package: > packages.txt
>biko:/var/lib/dpkg# ls -al | grep packages.txt
>-rw-r--r-- 1 root root 8147 Nov 23 19:44 packages.txt
>biko:/var/lib/dpkg# wc packages.txt
> 430 860 8147 packages.txt
>biko:/var/lib/dpkg#

Do you really want to see the whole list?
Or is there perhaps something in particular you are looking for?

Here is the dialogue for my reinstall attempt.
Man, these error messages are starting to look familiar.

>biko:/var/lib/dpkg# apt-get --reinstall install postgresql-client
>Reading Package Lists... Done
>Building Dependency Tree... Done
>0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and
>0 not up
>graded.
>Need to get 0B/280kB of archives. After unpacking 0B will be used.
>Do you want to continue? [Y/n] y
>dpkg: conflicting diversions involving `/Package: mysql-common' or
>`/Status: ins
>tall ok installed'
>E: Sub-process /usr/bin/dpkg returned an error code (2)
>biko:/var/lib/dpkg#

With more interminable hard disk spinning
as my only response to an attempt to once
again invoke psql.

-- Hugh Esco

At 10:41 PM 11/24/02 +0000, you wrote:
>On Sun, 2002-11-24 at 16:18, Hugh Esco wrote:
>
> > So it appears that instead of copying the symbolic link, it copied instead
> > pg_wrapper, renaming it in the new directory as psql.
> >
> > >hesco(at)biko:~$ /usr/lib/postgresql/bin/psql -U hesco template1
> >
> > hangs, and spins the hard drive interminably.
> > So I open a second shell and do:
> > >hesco(at)biko:~$ su postgres
> > >Password:
> > >postgres(at)biko:/home/hesco$ /usr/lib/postgresql/bin/psql
> > >No database specified
> > >postgres(at)biko:/home/hesco$ /usr/lib/postgresql/bin/psql template1
> >
> >
> > and that invocation also hangs, and spins the hard drive interminably.
> >
>
>Presumably it will try to call itself recursively. Since it does an
>exec, each successive process will replace the one before.
>...
> > >biko:/home/hesco# apt-get remove postgresql-client
> > >Reading Package Lists... Done
> > >Building Dependency Tree... Done
> > >The following packages will be REMOVED:
> > > postgresql postgresql-client
> > >0 packages upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
> > >Need to get 0B of archives. After unpacking 4530kB will be freed.
> > >Do you want to continue? [Y/n] y
> > >dpkg: conflicting diversions involving `/Package: mysql-common' or
> > >`/Status: ins
> > >tall ok installed'
> > >E: Sub-process /usr/bin/dpkg returned an error code (2)
>
>I don't know what that's about; you probably have some package installed
>that depends on either mysql or postgresql in some way, but I don't know
>of any file diversions involving postgresql packages. What have you got
>in /var/lib/dpkg/diversions?
>
> > >biko:/home/hesco# apt-get install postgresql-client
> > >Reading Package Lists... Done
> > >Building Dependency Tree... Done
> > >Sorry, postgresql-client is already the newest version.
> > >0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>
>You need to use the --reinstall option if the package is up to date:
>
> apt-get --reinstall install postgresql-client
>
>Then check the contents of /usr/lib/postgresql/bin. You should have the
>following real executable files, which are installed by
>postgresql-client:
>
> /usr/lib/postgresql/bin/readpgenv
> /usr/lib/postgresql/bin/psql
> /usr/lib/postgresql/bin/createuser
> /usr/lib/postgresql/bin/createdb
> /usr/lib/postgresql/bin/dropuser
> /usr/lib/postgresql/bin/dropdb
> /usr/lib/postgresql/bin/pg_dump
> /usr/lib/postgresql/bin/pg_restore
>
>You should be able to do the following as user postgres:
>
> $ /usr/bin/psql -d template1
>
>or
>
> $ /usr/lib/postgresql/bin/psql -d template1
>
>and get a connection in both cases.
>--
>Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
>Isle of Wight, UK http://www.lfix.co.uk/oliver
>GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
> ========================================
> "Jesus saith unto him, I am the way, the truth, and the
> life; no man cometh unto the Father, but by me."
> John 14:6
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message dima 2002-11-25 08:44:54 Re: Database backup and restore
Previous Message Nikolaus Dilger 2002-11-25 03:41:52 Re: H/W RAID 5 on slower disks versus no raid on faster HDDs