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

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Two started cluster on the same data directory and port
Дата
Msg-id b9b2c6fe-6ca7-4d70-b3cb-3d343a0f47e1@aklaver.com
обсуждение исходный текст
Ответ на Re: Two started cluster on the same data directory and port  (Loles <lolesft@gmail.com>)
Ответы Re: Two started cluster on the same data directory and port
Список pgsql-general
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 both?:

    /etc/postgresql/14/main/
    /etc/postgresql/14/main_old/

> 
> 
> El jue, 30 nov 2023 a las 17:34, Loles (<lolesft@gmail.com 
> <mailto:lolesft@gmail.com>>) escribió:
> 
>     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 disassociate the main_old cluster from the data
>     directory or how to resolve this situation.
> 
>     El jue, 30 nov 2023 a las 16:32, Adrian Klaver
>     (<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>)
>     escribió:
> 
>         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 /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
> 
>         Blaming it on not enough coffee, but I just noticed both
>         clusters are
>         pointing at the same data directory. I would NOT do:
> 
>               sudo pg_dropcluster 14 main_old
> 
>          >
>          >>
>          >> Thanks!
>          >>
>          >
> 
>         -- 
>         Adrian Klaver
>         adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Two started cluster on the same data directory and port
Следующее
От: Loles
Дата:
Сообщение: Re: Two started cluster on the same data directory and port