How to safely remove a corrupted cluster?

From: Marco Ippolito <ippolito(dot)marco(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: How to safely remove a corrupted cluster?
Date: 2019-09-19 11:02:38
Message-ID: CAFegzBTuuhdf9gjga_aBvL+HJzk06KCtohqiNZGdNO5jVnuv5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If the saying "to learn you have to make mistakes", I'm "learning"...:

I removed a cluster's folder without using pg_dropcluster... sio now I have
a corrupted cluster. How can I safely remove it?

(base) marco(at)pc:~$ pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
11 fabmnet 5433 down <unknown> /var/lib/postgresql/11/fabmnet
/var/log/postgresql/postgresql-11-fabmnet.log
11 main 5432 online postgres /var/lib/postgresql/11/main
/var/log/postgresql/postgresql-11-main.log

(base) marco(at)pc:~$ pg_dropcluster 11 fabmnet
Warning: corrupted cluster: data directory does not exist
Warning: systemd was not informed about the removed cluster yet. Operations
like "service postgresql start" might fail. To fix, run:
sudo systemctl daemon-reload
(base) marco(at)pc:~$ sudo systemctl daemon-reload
[sudo] password for marco:
(base) marco(at)pc:~$ pg_dropcluster 11 fabmnet
Warning: corrupted cluster: data directory does not exist
Warning: systemd was not informed about the removed cluster yet. Operations
like "service postgresql start" might fail. To fix, run:
sudo systemctl daemon-reload

Marco

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason Ralph 2019-09-19 12:04:21 n_live_tup count increase after vacuum
Previous Message Matthias Apitz 2019-09-19 10:30:39 PGPASSWORD in crypted form, for example BlowFish or SHA-256