Start by default seems synchronous, but stop isn't:
root@f:~# systemctl start postgresql; echo STARTED; ps auxw | grep ^postgre; 
systemctl stop postgresql; echo STOPPED; ps auxw | grep ^postgre; sleep 5s; 
echo LATER; ps auxw | grep ^postgre;STARTED
postgres 31731  0.0  0.0 216444 24764 ?        Ss   09:23   0:00 
/usr/lib/postgresql/12/bin/postgres -D /var/lib/postgresql/12/main -c 
config_file=/etc/postgresql/12/main/postgresql.conf
postgres 31733  0.0  0.0 216444  4024 ?        Ss   09:23   0:00 postgres: 
12/main: checkpointer   
postgres 31734  0.0  0.0 216444  5336 ?        Ss   09:23   0:00 postgres: 
12/main: background writer   
postgres 31735  0.0  0.0 216444  5372 ?        Ss   09:23   0:00 postgres: 
12/main: walwriter   
postgres 31736  0.0  0.0 216848  7440 ?        Ss   09:23   0:00 postgres: 
12/main: autovacuum launcher   
postgres 31737  0.0  0.0  70824  4432 ?        Ss   09:23   0:00 postgres: 
12/main: stats collector   
postgres 31738  0.0  0.0 216832  5988 ?        Ss   09:23   0:00 postgres: 
12/main: logical replication launcher   
STOPPED
postgres 31731  0.0  0.0 216444 24764 ?        Ss   09:23   0:00 
/usr/lib/postgresql/12/bin/postgres -D /var/lib/postgresql/12/main -c 
config_file=/etc/postgresql/12/main/postgresql.conf
postgres 31733  0.0  0.0 216444  4024 ?        Ss   09:23   0:00 postgres: 
12/main: checkpointer   
postgres 31734  0.0  0.0 216444  5336 ?        Ss   09:23   0:00 postgres: 
12/main: background writer   
postgres 31735  0.0  0.0 216444  5372 ?        Ss   09:23   0:00 postgres: 
12/main: walwriter   
postgres 31736  0.0  0.0 216848  7440 ?        Ss   09:23   0:00 postgres: 
12/main: autovacuum launcher   
postgres 31737  0.0  0.0  70824  4432 ?        Ss   09:23   0:00 postgres: 
12/main: stats collector   
postgres 31738  0.0  0.0 216832  5988 ?        Ss   09:23   0:00 postgres: 
12/main: logical replication launcher   
LATER

Some options are documented to wait by default, but that is only the hue "mode 
entering" commands like default, rescue, emergency. There it says "This 
operation is blocking by default, use --no-block to request asynchronous 
behavior".
I wondered if for everything else the default might be non-block and can be 
switched with `--wait`
But I got: --wait may only be used with the 'start' or 'restart' commands.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1862138

Title:
  "systemctl stop postgresql" fails to stop postgresql

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1862138/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to