pg_ctlcluster is not stopping cluster

From: "Telium Technical Support" <support(at)telium(dot)io>
To: <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: pg_ctlcluster is not stopping cluster
Date: 2023-04-07 22:27:27
Message-ID: 010001875dd4ebe6-ba96b71f-2461-45da-ab24-0abf56f56f4f-000000@email.amazonses.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

root(at)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(at)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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Boris Epstein 2023-04-07 22:45:44 Re: pg_ctlcluster is not stopping cluster
Previous Message Adrian Klaver 2023-04-07 20:52:17 Re: [EXTERNAL]: Re: UPSERT in Postgres