Navigation :
Citus support
Contributing
Contributing guidelines
Convert a Standalone to a Patroni Cluster
DCS Failsafe Mode
Dynamic Configuration Settings
Environment Configuration Settings
FAQ
HA multi datacenter
Installation
Integration with other tools
Modules
-
patroni
-
patroni package
-
patroni.api module
-
patroni.async_executor module
-
patroni.collections module
-
patroni.config module
-
patroni.config_generator module
-
patroni.ctl module
-
patroni.daemon module
-
patroni.dcs package
-
patroni.dcs.consul module
-
patroni.dcs.etcd module
-
patroni.dcs.etcd3 module
-
patroni.dcs.exhibitor module
-
patroni.dcs.kubernetes module
-
patroni.dcs.raft module
-
patroni.dcs.zookeeper module
-
patroni.dynamic_loader module
-
patroni.exceptions module
-
patroni.file_perm module
-
patroni.global_config module
-
patroni.ha module
-
patroni.log module
-
patroni.postgresql package
-
patroni.postgresql.available_parameters package
-
patroni.postgresql.bootstrap module
-
patroni.postgresql.callback_executor module
-
patroni.postgresql.cancellable module
-
patroni.postgresql.config module
-
patroni.postgresql.connection module
-
patroni.postgresql.misc module
-
patroni.postgresql.mpp package
-
patroni.postgresql.mpp.citus module
-
patroni.postgresql.postmaster module
-
patroni.postgresql.rewind module
-
patroni.postgresql.slots module
-
patroni.postgresql.sync module
-
patroni.postgresql.validator module
-
patroni.psycopg module
-
patroni.quorum module
-
patroni.raft_controller module
-
patroni.request module
-
patroni.scripts package
-
patroni.scripts.aws module
-
patroni.scripts.barman package
-
patroni.scripts.barman.cli module
-
patroni.scripts.barman.config_switch module
-
patroni.scripts.barman.recover module
-
patroni.scripts.barman.utils module
-
patroni.scripts.wale_restore module
-
patroni.tags module
-
patroni.thread_pool module
-
patroni.utils module
-
patroni.validator module
-
patroni.version module
-
patroni.watchdog package
-
patroni.watchdog.base module
-
patroni.watchdog.linux module
Patroni REST API
Patroni configuration
Pause/Resume mode for the cluster
Python Module Index
Release notes
Replica imaging and bootstrap
Replication modes
Security Considerations
Standby cluster
Using Patroni with Kubernetes
Watchdog support
YAML Configuration Settings
patronictl
patroni.postgresql.postmaster module
class
patroni.postgresql.postmaster.
PostmasterProcess
(
pid
:
int
)
View
on
GitHub
Bases:
Process
__init__
(
pid
:
int
)
→
None
View
on
GitHub
classmethod
_from_pidfile
(
data_dir
:
str
)
→
PostmasterProcess
|
None
View
on
GitHub
_is_postmaster_process
(
)
→
bool
View
on
GitHub
static
_read_postmaster_pidfile
(
data_dir
:
str
)
→
Dict
[
str
,
str
]
View
on
GitHub
Reads and parses postmaster.pid from the data directory
:returns dictionary of values if successful, empty dictionary otherwise
classmethod
from_pid
(
pid
:
int
)
→
PostmasterProcess
|
None
View
on
GitHub
static
from_pidfile
(
data_dir
:
str
)
→
PostmasterProcess
|
None
View
on
GitHub
pg_ctl_kill
(
mode
:
str
,
pg_ctl
:
str
)
→
bool
|
None
View
on
GitHub
signal_kill
(
)
→
bool
View
on
GitHub
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'
)
→
bool
|
None
View
on
GitHub
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
]
)
→
PostmasterProcess
|
None
View
on
GitHub
wait_for_user_backends_to_close
(
stop_timeout
:
float
|
None
)
→
bool
|
None
View
on
GitHub
Wait for all user backend processes to close before the postmaster shuts down.
Auxiliary/background PostgreSQL processes (archiver, checkpointer, wal senders, logical
replication workers, and so on) are identified via their command line and excluded, so that
only genuine client backends are awaited.
Parameters
:
stop_timeout
– maximum number of seconds to wait for the user backends to close.
If
None
, wait indefinitely.
Returns
:
True
if there were no user backends or all of them closed in time;
None
if
the list of children could not be retrieved or some backends were still alive after
stop_timeout
.
patroni.postgresql.postmaster.
pg_ctl_start
(
conn
:
Connection
,
cmdline
:
List
[
str
]
,
env
:
Dict
[
str
,
str
]
)
→
None
View
on
GitHub
© Copyright 2015 Compose, Zalando SE