Managing PostgreSQL cluster hosts
You can add and remove cluster hosts.
You cannot edit existing hosts.
Getting a list of cluster hosts
- Go to the folder page and select Managed Service for PostgreSQL.
- Click the name of the cluster you need and select the Hosts tab.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To get a list of cluster hosts, run the command:
ncp managed-postgresql host list \
--cluster-name <cluster name>
Result:
+-----------------------+--------------+---------+--------+-------------------+
| NAME | CLUSTER ID | ROLE | HEALTH | ZONE ID |
+-----------------------+--------------+---------+--------+-------------------+
| en1c...mdb.nemax.nebius.cloud | c9qp71dk1... | MASTER | ALIVE | eu-north1-c |
| en1c...mdb.nemax.nebius.cloud | c9qp71dk1... | REPLICA | ALIVE | eu-north1-c |
+-----------------------+--------------+---------+--------+-------------------+
The cluster name can be requested with a list of clusters in the folder.
Adding a host
The number of hosts in Managed Service for PostgreSQL clusters is limited by the CPU and RAM quotas available to DB clusters in your cloud. To check the resources in use, open the quotas page in the management console and find Managed Service for PostgreSQL.
To add a host to the cluster:
-
Go to the folder page and select Managed Service for PostgreSQL.
-
Click on the name of the cluster you need and go to the Hosts tab.
-
Click Add host.
-
Specify the host parameters:
- Availability zone.
- Subnet.
- Select Public access if the host must be accessible from outside Nebius AI.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To add a host to the cluster:
-
Request a list of cluster subnets to select one for the new host:
ncp vpc subnet list
Result:
+-----------+-----------+------------+-------------------+------------------+ | ID | NAME | NETWORK ID | ZONE | RANGE | +-----------+-----------+------------+-------------------+------------------+ | b0cl69... | default-eu-north1-c | enp6rq7... | eu-north1-c | [172.16.0.0/20] | | ... | +-----------+-----------+------------+-------------------+------------------+
-
View a description of the CLI command for adding a host:
ncp managed-postgresql host add --help
-
Run the add host command:
ncp managed-postgresql host add --cluster-name <cluster name> --host zone-id=<availability zone>,subnet-id=<subnet ID>
The subnet ID should be specified if the availability zone contains multiple subnets, otherwise Managed Service for PostgreSQL automatically selects a single subnet. The cluster name can be requested with a list of clusters in the folder.
You can also specify several additional options in the
--host
parameter to manage public access to a host and replication in a cluster:- External host visibility Nebius AI in the
assign-public-ip
option:true
: public access enabled.false
: public access disabled.
- External host visibility Nebius AI in the
Managed Service for PostgreSQL will run the add host operation.
Removing a host
You can remove a host from a PostgreSQL cluster if it is not the only host in it. To replace a single host, first create a new host and then remove the old one.
If the host is the master when deleted, Managed Service for PostgreSQL automatically assigns the next highest-priority replica as the master.
To remove a host from a cluster:
- Go to the folder page and select Managed Service for PostgreSQL.
- Click the name of the cluster you need and select the Hosts tab.
- Click the
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To remove a host from the cluster, run:
ncp managed-postgresql host delete <hostname>
--cluster-name=<cluster name>
The host name can be requested with a list of cluster hosts, and the cluster name can be requested with a list of clusters in the folder.