Postgres immediately closing connection when `systemctl reboot` command is fired. - Mailing list pgsql-bugs

From Raghvendra Mishra
Subject Postgres immediately closing connection when `systemctl reboot` command is fired.
Date
Msg-id CABZ0CP9YWCdNs3h493R5wuci4scRrQjrPHW03oy54WZDGfJ0Hw@mail.gmail.com
Whole thread Raw
List pgsql-bugs
Hi everyone,
I want ot seek your help identifying the expected behaviour in the scenario when we hit `systemctl reboot` command. When we run above mentioned command, PostgreSQL immediately closes the connections and shuts down without following the order mentioned in the service unit file. Since PostgreSQL is not waiting 
for dependent services to shut down first, services are crashing if they are trying to access PostgreSQL at that time. I further debugged it in the system journal file and found that systemd logs out the control group user of postgres immediately. I have these two questions around it.

1. Why does PostgreSQL not wait for other dependent services to stop at the time of reboot?

2. What is the role of the control group user, and why does systemd log it out at the time of reboot immediately?

Thanks in advance, and looking forward to hearing from you.


Regards,
Raghvendra

pgsql-bugs by date:

Previous
From: "zhouenbing"
Date:
Subject: 答复: empty,query_id, pg_stat_activity
Next
From: Yushu Chen
Date:
Subject: Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own