patroni.postgresql.postmaster module¶
-
class
patroni.postgresql.postmaster.
PostmasterProcess
(pid: int)¶ Bases:
psutil.Process
-
__init__
(pid: int) → None¶ Initialize self. See help(type(self)) for accurate signature.
-
classmethod
_from_pidfile
(data_dir: str) → Optional[patroni.postgresql.postmaster.PostmasterProcess]¶
-
_is_postmaster_process
() → bool¶
-
static
_read_postmaster_pidfile
(data_dir: str) → Dict[str, str]¶ Reads and parses postmaster.pid from the data directory
:returns dictionary of values if successful, empty dictionary otherwise
-
classmethod
from_pid
(pid: int) → Optional[patroni.postgresql.postmaster.PostmasterProcess]¶
-
static
from_pidfile
(data_dir: str) → Optional[patroni.postgresql.postmaster.PostmasterProcess]¶
-
pg_ctl_kill
(mode: str, pg_ctl: str) → Optional[bool]¶
-
signal_kill
() → bool¶ to suspend and kill postmaster and all children
:returns True if postmaster and children are killed, False if error
-
signal_stop
(mode: str, pg_ctl: str = 'pg_ctl') → Optional[bool]¶ Signal postmaster process to stop
:returns None if signaled, True if process is already gone, False if error
-
static
start
(pgcommand: str, data_dir: str, conf: str, options: List[str]) → Optional[patroni.postgresql.postmaster.PostmasterProcess]¶
-
wait_for_user_backends_to_close
(stop_timeout: Optional[float]) → None¶
-
-
patroni.postgresql.postmaster.
pg_ctl_start
(conn: multiprocessing.connection.Connection, cmdline: List[str], env: Dict[str, str]) → None¶