pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Moreno Andreo <moreno.andreo@evolu-s.it>
To: pgsql-general@lists.postgresql.org
Subject: Re: Unable to run psql on 9.5 after broken 12 remove
Date: Fri, 3 Jul 2020 08:21:28 -0700
Message-ID: <72e461f5-b12a-aba5-8113-4773e9342d01@aklaver.com> (raw)
In-Reply-To: <7557a9ec-f360-b10e-93cb-401acb635ec8@evolu-s.it>
References: <1c06a811-15e4-aca7-7a2a-6f80b662954c@evolu-s.it>
	<116c3181-0599-52ba-cd78-4ffa9df5ede2@evolu-s.it>
	<63353cb5-f9c3-4c54-6416-ff667744da15@aklaver.com>
	<7557a9ec-f360-b10e-93cb-401acb635ec8@evolu-s.it>

On 7/3/20 8:15 AM, Moreno Andreo wrote:
> Il 03/07/2020 16:51, Adrian Klaver ha scritto:
>> On 7/3/20 1:54 AM, Moreno Andreo wrote:
>>
>> Looks like the cluster was not removed from the pgcommon setup. This 
>> would explain why you can't run psql. By default pgcommon looks for 
>> the version of psql connected with the most recent version of Postgres 
>> it knows about, in this case 12. Unfortunately that binary no longer 
>> exists. You still have psql. Do:
>>
>> /usr/lib/postgresql/9.5/bin/psql --help
> OK, it confirms that 9.5 client is still ok
>>
>> To avoid having to do that try:
>>
>> sudo pg_dropcluster  12 main
> This reported a warning

Yeah, I'm guessing the original uninstall clean up process went off the 
rails here:

"
Processing triggers for postgresql-common (215.pgdg80+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Setting up python3.4 (3.4.2-1+deb8u3) ...
   File "/usr/lib/python3.4/http/client.py", line 1014
     raise InvalidURL(f"URL can't contain control characters. {url!r} "
^
SyntaxError: invalid syntax
dpkg: error processing package python3.4 (--configure):
"


The below just finished what the above started.

> 
> root@datastore-1:/home/user# pg_dropcluster 12 main
> Warning: corrupted cluster: data directory does not exist
> 
> ... but it did its job
> 
> root@datastore-1:/home/user# sudo -u postgres psql
> psql (9.5.6)
> Type "help" for help.
> 
> postgres=# \q
> 
> 
> Thanks, you saved my day again!
> 
> Moreno.
> 
>>
>>>
>>>


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (5+ messages)

Message-ID: <72e461f5-b12a-aba5-8113-4773e9342d01@aklaver.com>
Permalink:  ../72e461f5-b12a-aba5-8113-4773e9342d01@aklaver.com/
Also on:    postgresql.org/message-id/72e461f5-b12a-aba5-8113-4773e9342d01@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, moreno.andreo@evolu-s.it
  Subject: Re: Unable to run psql on 9.5 after broken 12 remove
  In-Reply-To: <72e461f5-b12a-aba5-8113-4773e9342d01@aklaver.com>
  References: <1c06a811-15e4-aca7-7a2a-6f80b662954c@evolu-s.it> <116c3181-0599-52ba-cd78-4ffa9df5ede2@evolu-s.it> <63353cb5-f9c3-4c54-6416-ff667744da15@aklaver.com> <7557a9ec-f360-b10e-93cb-401acb635ec8@evolu-s.it> <72e461f5-b12a-aba5-8113-4773e9342d01@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox