You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BTW, it looks like yb-ctl doesn’t stop the Postgres process when stopping / destroying a cluster (at least for RF1). I remember it used to do so until recently. Could it be due to recent yb-ctl change to support multi-head PG?
23:42 $ ./bin/yb-ctl stop
2018-12-09 23:42:56,275 INFO: Stopping server master-1 PID=74434
2018-12-09 23:42:56,276 INFO: Waiting for server master-1 PID=74434 to stop...
2018-12-09 23:42:56,805 INFO: Stopping server tserver-1 PID=74437
2018-12-09 23:42:56,805 INFO: Waiting for server tserver-1 PID=74437 to stop...
✔ ~/code/yugabyte [master|⚑ 12]
23:42 $ ps
PID TTY TIME CMD
1339 ttys000 0:00.05 /Applications/iTerm.app/Contents/MacOS/iTerm2 --server /usr/bin/login -fpl
1341 ttys000 0:15.20 -bash
74458 ttys000 0:00.07 /Users/robert/code/yugabyte/build/debug-clang-dynamic-enterprise/postgres/
1346 ttys001 0:00.05 /Applications/iTerm.app/Contents/MacOS/iTerm2 --server /usr/bin/login -fpl
1349 ttys001 0:00.58 -bash
Summary:
Two independent approaches are being used:
1) postmaster in YB mode at Mac listen when STDIN is closed using same select like it does for sockets. And exit when it happens.
2) When yb-ctl stops tserver it also checks for pg_data/postmaster.pid and tries to kill the appropriate pid.
Test Plan:
bin/yb-ctl create --enable_postgres
make sure that postgres processes are running:
ps -ef | grep postgres
bin/yb-ctl stop
make sure that postgres prcoesses are stopped.
Reviewers: neil, robert, bogdan, mikhail
Reviewed By: robert
Subscribers: ybase, bharat
Differential Revision: https://phabricator.dev.yugabyte.com/D6018
@robertpang noticed this a while ago, and @spolitov also ran into this issue recently.
From @robertpang:
Relevant link:
https://stackoverflow.com/questions/284325/how-to-make-child-process-die-after-parent-exits
The text was updated successfully, but these errors were encountered: