PostgreSQL parameters
In this article:
PostgreSQL parameters#
Parameters for creating a service#
These parameters are provided as parameters in the method CreateService.
When creating a new service, the parameters marked as Required should be provided.
If the selected version PostgreSQL supports other parameters, they can be set in the options parameter.
version#
DBMS version.
Required |
Datatype |
Valid values |
---|---|---|
Yes |
String |
10 |
replication_mode#
Replication mode in the Patroni cluster. Available only when the High-availability service option is selected.
Required |
Datatype |
Valid values |
---|---|---|
Yes, if the High-availability service option is selected |
String |
asynchronous |
autovacuum#
Controls whether the server should run the autovacuum launcher daemon.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
String |
ON/OFF |
ON |
N/A |
autovacuum_max_workers#
Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1–262143 |
3 |
= vCPU, min 3 |
autovacuum_vacuum_cost_delay#
Specifies the delay in milliseconds that will be used in automatic VACUUM
operations when the cost limit is exceeded.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
-1 |
20 (ver 10-11) |
N/A |
autovacuum_vacuum_cost_limit#
Specifies the cost limit value that will be used in automatic VACUUM
operations.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
-1 |
-1 |
N/A |
autovacuum_analyze_scale_factor#
Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE
.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Float |
0–100 |
0.1 |
N/A |
autovacuum_vacuum_scale_factor#
Specifies a fraction of the table size to add to autovacuum_vacuum_threshold
when deciding whether to trigger a VACUUM
.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Float |
0–100 |
0.2 |
N/A |
max_connections#
The maximum number of simultaneous connections to the database server.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1–262143 |
100 |
200 × vCPU |
wal_keep_segments#
The minimum number of log files segments that should be kept in the pg_xlog directory, in case a standby server needs to fetch them for streaming replication. This parameter is relevant only for PostgreSQL: 10, 11, 12 version.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
0–2147483647 |
0 |
4 |
min_wal_size#
As long as WAL disk usage stays below this setting (in bytes), old WAL files are always recycled for future use at a checkpoint, rather than removed.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
32–2147483647 MiB |
80 MiB |
5% of the volume, |
max_wal_size#
The max size in bytes that WAL can reach at automatic checkpoints.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
2–2147483647 MiB |
1 GiB |
10% of the volume, |
wal_buffers#
Shared memory to buffer WAL data not yet written to a volume. It is an integer number specifying the quantity of 8 KB units.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
8–262143 |
1/32 shared buffers, no less than 8 (64 KiB), but no more that the size of 1 WAL segment |
N/A |
effective_cache_size#
Sets the planner’s assumption about the effective size of the disk cache that is available to a single query. See details.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1–2147483647 |
524288 |
N/A |
work_mem#
Sets the base maximum amount of memory in bytes to be used by a query operation (such as a sort or hash table) before writing to temporary disk files.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
64–2147483647 KiB |
4 MiB |
N/A |
maintenance_work_mem#
Specifies the maximum amount of memory in bytes to be used by maintenance operations, such as VACUUM
, CREATE INDEX
, and ALTER TABLE ADD FOREIGN KEY
.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1 MiB–2 GiB |
64 MiB |
N/A |
effective_io_concurrency#
Sets the number of concurrent disk I/O operations.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
0–1000 |
1 |
N/A |
max_worker_processes#
Sets the maximum number of background processes that the system can support.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
0–262143 |
8 |
= vCPU |
max_parallel_workers_per_gather#
Sets the maximum number of workers that can be started by a single Gather node. Parallel workers are taken from the pool of processes established by max_worker_processes.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
0–1024 |
2 |
vCPU/2 |
max_parallel_maintenance_workers#
Sets the maximum number of parallel workers that can be started by a single utility command. This parameter is relevant only for PostgreSQL versions 11 and higher.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
0–1024 |
2 |
vCPU/2 |
max_parallel_workers#
Sets the maximum number of workers that the system can support for parallel operations.
Required |
Datatype |
Valid values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
0–1024 |
8 |
= vCPU |
monitoring - The monitoring information for the instance#
Connection to a monitoring service.
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
For all services, except for Prometheus |
Yes |
Boolean |
true |
false |
monitor_by#
Monitoring service ID. The specified service must be deployed in the same project as the current service.
Required |
Editable |
Datatype |
Valid values |
---|---|---|---|
Yes, if the |
Yes |
String |
The ID of a monitoring service running within the same VPC as the current service |
monitoring_labels#
Labels to be assigned to the metrics of the monitored service in the monitoring service.
Required |
Editable |
Datatype |
Valid values |
---|---|---|---|
No. If |
Yes |
Dict |
The label name may contain digits, Latin letters, and an underscore character. The label value may contain any ASCII characters. |
logging#
Connection to a logging service.
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
For all services, except for ELK and Prometheus |
Yes |
Boolean |
true |
false |
log_to#
Logging service ID. The logged service must be deployed in the same project as the current service.
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
Yes, if the |
Yes |
String |
The ID of a monitoring service running within the same VPC as the current service |
options#
Container for other parameters PostgreSQL.
Note
If the parameter name includes a dot, then it cannot be passed in the container for additional parameters. If you need to use such parameter, contact technical support.
Required |
Datatype |
Valid values |
---|---|---|
No |
Dict |
N/A |
User creation parameters#
These parameters are specified in the parameters attribute of the User object when the latter is passed in the users parameter of the ModifyService method.
The Editable property indicates whether the parameter value can be edited after the user has been created.
password#
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
Yes |
Yes |
String |
It should not contain such characters as |
N/A |
Parameters for creating a database#
These parameters are specified in the parameters attribute of the Database object when the latter is passed in the databases parameter of the ModifyService method.
The Editable property indicates whether a parameter value can be edited after the database has been created.
The backup_id and backup_db_name parameters are used to restore a database from an existing backup. Information about existing backups can be obtained using the method ListBackups.
owner#
Name of the user who is the database owner. This must be one of the existing users. Such a user cannot be deleted as long as it is the database owner.
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
Yes |
Yes |
String |
Existing database user |
N/A |
locale#
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
No |
No |
String |
Any correct encoding value |
ru_RU.UTF-8 |
encoding#
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
No |
No |
String |
Any correct encoding value |
UTF8 |
extensions#
Extensions to be installed for the database.
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
No |
Yes |
Array of strings |
address_standardizer |
N/A |
backup_id#
Database backup ID.
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
No |
No |
String |
ID of an existing database backup |
N/A |
backup_db_name#
The name of a database from the backup specified in the backup_id parameter.
Required |
Editable |
Datatype |
Valid values |
Default |
---|---|---|---|---|
Yes, if backup_id is specified |
No |
String |
The name of a database included in the backup |
N/A |