O que eu faria é desligar o servidor primeiro digitando:
% bl0ck_qu0te%Verifique este
liste todos os pacotes do PostgreSQL digitando:
% bl0ck_qu0te%e finalmente remover os pacotes que eu quero, por exemplo:
% bl0ck_qu0te%Eu tenho o PostgreSQL 9.3 e 9.4 instalado, agora eu quero desinstalar o 9.3 para remover conflitos
Eu o removi usando:
$ sudo apt-get purge postgresql-9.3
Mas quando eu corro $ ps aux|grep postgres
eu recebo isso:
postgres 6858 0.0 0.4 254828 16796 ? S 11:04 0:00 /usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c config_file=/etc/postgresql/9.4/main/postgresql.conf
postgres 6860 0.0 0.0 254828 1896 ? Ss 11:04 0:00 postgres: checkpointer process
postgres 6861 0.0 0.0 254828 2688 ? Ss 11:04 0:00 postgres: writer process
postgres 6862 0.0 0.0 254828 1680 ? Ss 11:04 0:00 postgres: wal writer process
postgres 6863 0.0 0.0 255232 2716 ? Ss 11:04 0:00 postgres: autovacuum launcher process
postgres 6864 0.0 0.0 109972 1808 ? Ss 11:04 0:00 postgres: stats collector process
amitoj 9414 0.0 0.0 15940 936 pts/3 S+ 11:13 0:00 grep --color=auto postgres
postgres 9812 0.0 0.2 251956 11060 ? S Jan14 0:00 /usr/lib/postgresql/9.3/bin/postgres -D /var/lib/postgresql/9.3/main -c config_file=/etc/postgresql/9.3/main/postgresql.conf
postgres 9815 0.0 0.1 252092 6652 ? Ss Jan14 0:00 postgres: checkpointer process
postgres 9816 0.0 0.0 251956 2452 ? Ss Jan14 0:00 postgres: writer process
postgres 9817 0.0 0.0 251956 3876 ? Ss Jan14 0:00 postgres: wal writer process
postgres 9818 0.0 0.0 252760 2952 ? Ss Jan14 0:02 postgres: autovacuum launcher process
postgres 9819 0.0 0.0 107912 1920 ? Ss Jan14 0:01 postgres: stats collector process
postgres 32059 0.0 0.4 254828 16360 ? S 10:02 0:00 /usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c config_file=/etc/postgresql/9.4/main/postgresql.conf
postgres 32061 0.0 0.0 254828 1832 ? Ss 10:02 0:00 postgres: checkpointer process
postgres 32062 0.0 0.0 254828 2632 ? Ss 10:02 0:00 postgres: writer process
postgres 32063 0.0 0.0 254828 1616 ? Ss 10:02 0:00 postgres: wal writer process
postgres 32064 0.0 0.0 255232 2540 ? Ss 10:02 0:02 postgres: autovacuum launcher process
postgres 32065 0.0 0.0 109972 1756 ? Ss 10:02 0:00 postgres: stats collector process
Visivelmente, o 9.3 ainda está lá. O que devo fazer?
Estou usando o Django 1.9, que requer o PostgreSQL 9.4+ e encontro um erro devido à presença da versão 9.3.
django.db.utils.OperationalError: FATAL: could not open relation mapping file "global/pg_filenode.map": No such file or directory