| From: | Loles <lolesft(at)gmail(dot)com> |
|---|---|
| To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
| Cc: | PostgreSQL <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Two started cluster on the same data directory and port |
| Date: | 2023-11-30 20:29:42 |
| Message-ID: | CA+FWGK5we+Cw=h=ezhqDcXrmvwcLGE7tMsMdv4fQ39Q-0Ohr_A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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 case
El jue., 30 nov. 2023 16:23, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
escribió:
> On 11/30/23 05:37, Loles wrote:
> > Hi!
> >
> > I have this situation on a server that is giving me problems.
> >
> > postgres(at)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
> >
> > How can I stop, even delete, the main_old cluster?
>
> Assuming you are on Debian/Ubuntu.
>
> 1) sudo pg_ctlcluster stop 14 main_old
>
> This will stop the server for this session
>
> 2) sudo vi /etc/postgresql/14/main_old/start.conf
>
> Change auto to manual.
> This will keep the server from restarting on reboot.
> You can still start it using
> sudo pg_ctlcluster start 14 main_old
> Though if you want to do that then:
> vi /etc/postgresql/14/main_old/postgresql.conf
> and change port to something other then 5432.
>
> 3) If you have determined you really don't need that server and have all
> the data safely backed up or moved to the other server, then(THIS IS NOT
> REVERSIBLE):
>
> sudo pg_dropcluster 14 main_old
>
> >
> > Thanks!
> >
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2023-11-30 20:35:34 | Re: Two started cluster on the same data directory and port |
| Previous Message | Tom Lane | 2023-11-30 20:07:49 | Re: libpq crashing on macOS during connection startup |