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

2023-12-01 Thread Adrian Klaver
On 12/1/23 01:17, Loles wrote: Yes, it seems to be caused by systemd. To be more accurate it is caused by the the file postgresql-generator located here: /lib/systemd/system-generators/ That file is installed by the Postgres Debian/Ubuntu package, so it is the Postgres install that is

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

2023-12-01 Thread Loles
Yes, it seems to be caused by systemd. I'll investigate there. If not, I can upgrade PostgreSQL and get rid of server 14. Thank you very much Adrian... I'm going to get a cup of coffee because the topic requires it :D El vie, 1 dic 2023 a las 6:19, Adrian Klaver () escribió: > On 11/30/23

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

2023-11-30 Thread Adrian Klaver
On 11/30/23 20:43, Matthias Apitz wrote: El día jueves, noviembre 30, 2023 a las 02:10:25p. m. -0800, Adrian Klaver escribió: On 11/30/23 12:35, Adrian Klaver wrote: On 11/30/23 10:35, Adrian Klaver wrote: On 11/30/23 09:27, Loles wrote: cd /etc/postgresql/14/ sudo rm -r main_old/  

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

2023-11-30 Thread Matthias Apitz
El día jueves, noviembre 30, 2023 a las 02:10:25p. m. -0800, Adrian Klaver escribió: > On 11/30/23 12:35, Adrian Klaver wrote: > > On 11/30/23 10:35, Adrian Klaver wrote: > > > On 11/30/23 09:27, Loles wrote: > > > > > > cd /etc/postgresql/14/ > > sudo rm -r main_old/ > >   or > > sudo cp -r

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

2023-11-30 Thread Adrian Klaver
On 11/30/23 12:35, Adrian Klaver wrote: On 11/30/23 10:35, Adrian Klaver wrote: On 11/30/23 09:27, Loles wrote: cd /etc/postgresql/14/ sudo rm -r main_old/   or sudo cp -r main_old Arrgh. sudo mv -r main_old Memo to self don't eat lunch and copy/paste at same time. -- Adrian

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

2023-11-30 Thread Adrian Klaver
On 11/30/23 10:35, Adrian Klaver wrote: 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  

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

2023-11-30 Thread Loles
No, they are not symbolic links. I have thought about moving the main_old directory somewhere else and it doesn't change anything because the cluster main_old is linked to the main data directory. In fact, neither the log nor any main_old data file changes, they are all from 2020. It's a strange

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

2023-11-30 Thread Adrian Klaver
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

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

2023-11-30 Thread Loles
root@hostname:~# su - postgres postgres@hostname:~$ *nano /etc/postgresql/14/main_old/start.conf* postgres@hostname:~$ exit cerrar sesión root@hostname:~# *pg_ctlcluster stop 14 main* *(change auto for disabled and exit with save)* root@hostname:~# ps -ef | grep postgres root26091512

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

2023-11-30 Thread Loles
Yes, it exists but it is obsolete. The files and directories are all dated 2022. It was obsolete and no longer valid, it could be deleted. Only the main cluster is correct. El jue, 30 nov 2023 a las 17:43, Adrian Klaver () escribió: > On 11/30/23 08:37, Loles wrote: > > Every time I stop the

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

2023-11-30 Thread Adrian Klaver
On 11/30/23 08:46, Loles wrote: Yes, it exists but it is obsolete. The files and directories are all dated 2022. It was obsolete and no longer valid, it could be deleted. Only the main cluster is correct. First try: vi /etc/postgresql/14/main_old/start.conf and change auto to

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

2023-11-30 Thread Adrian Klaver
On 11/30/23 08:37, Loles wrote: Every time I stop the main_old cluster with sudo pg_ctlcluster stop 14 main_old, both are stopped. And when I raise sudo pg_ctlcluster start 14 main, both are raised. I don't know how I got into this situation and I don't know how to resolve it. Is there

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

2023-11-30 Thread Adrian Klaver
On 11/30/23 08:34, Loles wrote: Please reply to list also. Ccing list. Indeed, that is the problem, they are two different clusters, pointing to the same data directory and reading from the same port. I can't change the port because it is the same postgresql.conf I don't know how to

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

2023-11-30 Thread Loles
Every time I stop the main_old cluster with sudo pg_ctlcluster stop 14 main_old, both are stopped. And when I raise sudo pg_ctlcluster start 14 main, both are raised. I don't know how I got into this situation and I don't know how to resolve it. El jue, 30 nov 2023 a las 17:34, Loles ()

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

2023-11-30 Thread Adrian Klaver
On 11/30/23 07:23, Adrian Klaver wrote: On 11/30/23 05:37, Loles wrote: Hi! I have this situation on a server that is giving me problems. postgres@hostname:~$ pg_lsclusters Ver Cluster  Port Status Owner    Data directory              Log file 14  main     5432 online postgres

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

2023-11-30 Thread Adrian Klaver
On 11/30/23 05:37, Loles wrote: Hi! I have this situation on a server that is giving me problems. postgres@hostname:~$ pg_lsclusters Ver Cluster  Port Status Owner    Data directory              Log file 14  main     5432 online postgres /var/lib/postgresql/14/main

Two started cluster on the same data directory and port

2023-11-30 Thread Loles
Hi! I have this situation on a server that is giving me problems. postgres@hostname:~$ pg_lsclusters Ver Cluster Port Status OwnerData directory Log file 14 main 5432 online postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log 14 main_old 5432