Re: Two started cluster on the same data directory and port

Adrian Klaver <adrian.klaver@aklaver.com>

From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Loles <lolesft@gmail.com>
Cc: PostgreSQL <pgsql-general@postgresql.org>
Date: 2023-11-30T18:35:56Z
Lists: pgsql-general
On 11/30/23 09:27, Loles wrote:

> root@hostname:~# pg_lsclusters
> Ver Cluster  Port Status Owner    Data directory              Log file
> *14  main     5432 online* postgres /var/lib/postgresql/14/main 
> /var/log/postgresql/postgresql-14-main.log
> *14  main_old 5432 online *postgres /var/lib/postgresql/14/main 
> /var/log/postgresql/postgresql-14-main_old.log
> 
> Start, up the two cluster.
> 

Before going any further make sure you have a current backup of the 
database.

Hmm, are /etc/postgresql/14/main/ and /etc/postgresql/14/main_old/ 
symlinked together?

If not what if you move the ~14/main_old/ directory somewhere else and 
then restart Postgres?

Adrian Klaver
adrian.klaver@aklaver.com