RE: pg_ctlcluster is not stopping cluster

Поиск
Список
Период
Сортировка
От Telium Technical Support
Тема RE: pg_ctlcluster is not stopping cluster
Дата
Msg-id 010001875de7c4b6-ed8156a7-ca69-4d0d-97b1-3e65bbdb886a-000000@email.amazonses.com
обсуждение исходный текст
Ответ на Re: pg_ctlcluster is not stopping cluster  (Boris Epstein <borepstein@gmail.com>)
Ответы RE: pg_ctlcluster is not stopping cluster  (Thorsten Glaser <tg@evolvis.org>)
Список pgsql-general

These commands are actually run from a C++ program (which does a lot of other things)…so not easy to change.  I’m assuming something is misconfigured on the host that’s causing this unusual behavior….and that’s what I need to understand

 

From: Boris Epstein [mailto:borepstein@gmail.com]
Sent: Friday, April 7, 2023 6:46 PM
To: Telium Technical Support <support@telium.io>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_ctlcluster is not stopping cluster

 

I wonder if the best way to proceed would be to go on to individual nodes in the cluster and use OS level commands (such as ps) to track individual processes and stop them individually.

 

On Fri, Apr 7, 2023 at 6:27 PM Telium Technical Support <support@telium.io> wrote:

I am string to stop my PostgreSQL (on debian 11) server using the following command

 

root@d11:/# sudo -u postgres /usr/bin/pg_ctlcluster 15 main stop -- -m fast -D /var/lib/postgresql/13/main

Notice: extra pg_ctl/postgres options given, bypassing systemctl for stop operation

pg_ctl: PID file "/var/lib/postgresql/13/main/postmaster.pid" does not exist

Is server running?

 

The notice is correct, the is no such postmaster.pid file in that directory, but yes the service is running. I can confirm it's running with:

 

root@d11:/# sudo -u postgres /usr/bin/pg_ctlcluster 15 main status -- -D /var/lib/postgresql/13/main

pg_ctl: server is running (PID: 2701882)

/usr/lib/postgresql/15/bin/postgres "-D" "/var/lib/postgresql/13/main" "-c" "config_file=/etc/postgresql/15/main/postgresql.conf"

 

So why is my stop command being ignored? (I tried without the -m fast option but no change, and I'd like to keep that for other reasons). I confirmed with 'ps ax' that postgresql 15 is running, despite the directory suggesting it might be 13.  Coincidentally, there is a postmaster.pid file in a directory OTHER than the data directory:

 

/var/lib/postgresql/15/main/postmaster.pid

 

(and notice the 15). Is this a clue?

 

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: pg_ctlcluster is not stopping cluster
Следующее
От: Thorsten Glaser
Дата:
Сообщение: Re: pg_ctlcluster is not stopping cluster