Skip to main content

types

Access​

dataLens : bool​

Allow access for DataLens

webSql : bool​

Allow SQL queries to the cluster databases from the management console.

See SQL queries in the management console for more details.

serverless : bool​

Allow access for Serverless

dataTransfer : bool​

Allow access for DataTransfer.

yandexQuery : bool​

Allow access for YandexQuery.

AnytimeMaintenanceWindow​

Backup​

A PostgreSQL Backup resource. For more information, see the Developer's Guide.

BackupMethod​

  • BACKUP_METHOD_UNSPECIFIED

  • BASE

    Base backup

  • INCREMENTAL

    Delta (incremental) PostgreSQL backup

BackupCreationType​

  • BACKUP_CREATION_TYPE_UNSPECIFIED

  • AUTOMATED

    Backup created by automated daily schedule

  • MANUAL

    Backup created by user request

BackupStatus​

  • BACKUP_STATUS_UNSPECIFIED

  • DONE

    Backup is done

  • CREATING

    Backup is creating

id : string​

Required. ID of the backup.

folderId : string​

ID of the folder that the backup belongs to.

createdAt : google.protobuf.Timestamp​

Creation timestamp in RFC3339 text format (i.e. when the backup operation was completed).

sourceClusterId : string​

ID of the PostgreSQL cluster that the backup was created for.

startedAt : google.protobuf.Timestamp​

Time when the backup operation was started.

size : int64​

Size of backup, in bytes

type : BackupCreationType​

How this backup was created (manual/automatic/etc...)

method : BackupMethod​

Method of backup creation

journalSize : int64​

Size of the journal associated with backup, in bytes

status : BackupStatus​

Status of backup

Cluster​

A PostgreSQL Cluster resource. For more information, see the Concepts section of the documentation.

Environment​

  • ENVIRONMENT_UNSPECIFIED

  • PRODUCTION

    Stable environment with a conservative update policy: only hotfixes are applied during regular maintenance.

  • PRESTABLE

    Environment with more aggressive update policy: new versions are rolled out irrespective of backward compatibility.

Health​

  • HEALTH_UNKNOWN

    State of the cluster is unknown ([Host.health][1] for every host in the cluster is UNKNOWN).

  • ALIVE

    Cluster is alive and well ([Host.health][2] for every host in the cluster is ALIVE).

  • DEAD

    Cluster is inoperable ([Host.health][3] for every host in the cluster is DEAD).

  • DEGRADED

    Cluster is working below capacity ([Host.health][4] for at least one host in the cluster is not ALIVE).

Status​

  • STATUS_UNKNOWN

    Cluster state is unknown.

  • CREATING

    Cluster is being created.

  • RUNNING

    Cluster is running normally.

  • ERROR

    Cluster encountered a problem and cannot operate.

  • UPDATING

    Cluster is being updated.

  • STOPPING

    Cluster is stopping.

  • STOPPED

    Cluster stopped.

  • STARTING

    Cluster is starting.

id : string​

ID of the PostgreSQL cluster. This ID is assigned by MDB at creation time.

folderId : string​

ID of the folder that the PostgreSQL cluster belongs to.

createdAt : google.protobuf.Timestamp​

Creation timestamp in RFC3339 text format.

name : string​

Name of the PostgreSQL cluster. The name is unique within the folder. 1-63 characters long.

description : string​

Description of the PostgreSQL cluster. 0-256 characters long.

labels : string​

Custom labels for the PostgreSQL cluster as key:value pairs. Maximum 64 per resource.

environment : Environment​

Deployment environment of the PostgreSQL cluster.

monitoring : Monitoring​

Description of monitoring systems relevant to the PostgreSQL cluster.

config : ClusterConfig​

Configuration of the PostgreSQL cluster.

networkId : string​

ID of the network that the cluster belongs to.

health : Health​

Aggregated cluster health.

status : Status​

Current state of the cluster.

maintenanceWindow : MaintenanceWindow​

Maintenance window for the cluster.

plannedOperation : MaintenanceOperation​

Planned maintenance operation to be started for the cluster within the nearest maintenance_window.

securityGroupIds : string​

User security groups

deletionProtection : bool​

Deletion Protection inhibits deletion of the cluster

hostGroupIds : string​

Host groups hosting VMs of the cluster.

ClusterConfig​

version : string​

Version of PostgreSQL server software.

One of postgresqlConfig​

Configuration for PostgreSQL servers in the cluster.

  • postgresqlConfig_9_6 : config.PostgresqlConfigSet9_6​

    Configuration of a PostgreSQL 9.6 server.

  • postgresqlConfig_10_1c : config.PostgresqlConfigSet10_1C​

    Configuration of a PostgreSQL 10 1C server.

  • postgresqlConfig_10 : config.PostgresqlConfigSet10​

    Configuration of a PostgreSQL 10 server.

  • postgresqlConfig_11 : config.PostgresqlConfigSet11​

    Configuration of a PostgreSQL 11 server.

  • postgresqlConfig_11_1c : config.PostgresqlConfigSet11_1C​

    Configuration of a PostgreSQL 11 1C server.

  • postgresqlConfig_12 : config.PostgresqlConfigSet12​

    Configuration of a PostgreSQL 12 server.

  • postgresqlConfig_12_1c : config.PostgresqlConfigSet12_1C​

    Configuration of a PostgreSQL 12 1C server.

  • postgresqlConfig_13 : config.PostgresqlConfigSet13​

    Configuration of a PostgreSQL 13 server.

  • postgresqlConfig_13_1c : config.PostgresqlConfigSet13_1C​

    Configuration of a PostgreSQL 13 1C server.

  • postgresqlConfig_14 : config.PostgresqlConfigSet14​

    Configuration of a PostgreSQL 14 server.

  • postgresqlConfig_14_1c : config.PostgresqlConfigSet14_1C​

    Configuration of a PostgreSQL 14 1C server.

  • postgresqlConfig_15 : config.PostgresqlConfigSet15​

    Configuration of a PostgreSQL 15 server.

  • postgresqlConfig_15_1c : config.PostgresqlConfigSet15_1C​

    Configuration of a PostgreSQL 15 1C server.

  • postgresqlConfig_16 : config.PostgresqlConfigSet16​

    Configuration of a PostgreSQL 16 server.

  • postgresqlConfig_16_1c : config.PostgresqlConfigSet16_1C​

    Configuration of a PostgreSQL 16 1C server.

poolerConfig : ConnectionPoolerConfig​

Configuration of the connection pooler.

resources : Resources​

Resources allocated to PostgreSQL hosts.

autofailover : google.protobuf.BoolValue​

Configuration setting which enables/disables autofailover in cluster.

backupWindowStart : google.type.TimeOfDay​

Time to start the daily backup, in the UTC timezone.

backupRetainPeriodDays : google.protobuf.Int64Value​

Retention policy of automated backups.

access : Access​

Access policy to DB

performanceDiagnostics : PerformanceDiagnostics​

Configuration of the performance diagnostics service.

diskSizeAutoscaling : DiskSizeAutoscaling​

Disk size autoscaling

ConnectionPoolerConfig​

PoolingMode​

  • POOLING_MODE_UNSPECIFIED

  • SESSION

    Session pooling mode.

  • TRANSACTION

    Transaction pooling mode.

  • STATEMENT

    Statement pooling mode.

poolingMode : PoolingMode​

Mode that the connection pooler is working in. See descriptions of all modes in the documentation for PgBouncer.

poolDiscard : google.protobuf.BoolValue​

Setting server_reset_query_always parameter in PgBouncer.

Database​

A PostgreSQL Database resource. For more information, see the Developer's Guide.

name : string​

Name of the database.

clusterId : string​

ID of the PostgreSQL cluster that the database belongs to.

owner : string​

Name of the user assigned as the owner of the database.

lcCollate : string​

POSIX locale for string sorting order. Can only be set at creation time.

lcCtype : string​

POSIX locale for character classification. Can only be set at creation time.

extensions : Extension​

PostgreSQL extensions enabled for the database.

templateDb : string​

Name of the database template.

deletionProtection : google.protobuf.BoolValue​

Deletion Protection inhibits deletion of the database

Default value: unspecified (inherits cluster's deletion_protection)

DatabaseSpec​

name : string​

Name of the PostgreSQL database. 1-63 characters long.

owner : string​

Name of the user to be assigned as the owner of the database. To get the list of available PostgreSQL users, make a UserService.List request.

lcCollate : string​

POSIX locale for string sorting order. Can only be set at creation time.

lcCtype : string​

POSIX locale for character classification. Can only be set at creation time.

extensions : Extension​

PostgreSQL extensions to be enabled for the database.

templateDb : string​

Name of the PostgreSQL database template.

deletionProtection : google.protobuf.BoolValue​

Deletion Protection inhibits deletion of the database

Default value: unspecified (inherits cluster's deletion_protection)

DiskSizeAutoscaling​

plannedUsageThreshold : int64​

Threshold of storage usage (in percent) that triggers automatic scaling of the storage during the maintenance window. Zero value means disabled threshold.

emergencyUsageThreshold : int64​

Threshold of storage usage (in percent) that triggers immediate automatic scaling of the storage. Zero value means disabled threshold.

diskSizeLimit : int64​

New storage size (in bytes) that is set when one of the thresholds is achieved.

Extension​

name : string​

Name of the extension, e.g. pg_trgm or pg_btree. Extensions supported by Managed Service for PostgreSQL are listed in the Developer's Guide.

version : string​

Version of the extension.

Host​

Role​

  • ROLE_UNKNOWN

    Role of the host in the cluster is unknown. Default value.

  • MASTER

    Host is the master PostgreSQL server in the cluster.

  • REPLICA

    Host is a replica (standby) PostgreSQL server in the cluster.

ReplicaType​

  • REPLICA_TYPE_UNKNOWN

    Replica type is unknown (we have no data) or it's master

  • ASYNC

  • SYNC

  • QUORUM

Health​

  • HEALTH_UNKNOWN

    Health of the host is unknown. Default value.

  • ALIVE

    The host is performing all its functions normally.

  • DEAD

    The host is inoperable, and cannot perform any of its essential functions.

  • DEGRADED

    The host is degraded, and can perform only some of its essential functions.

  • READONLY

    The host is alive, but in read-only mode.

name : string​

Name of the PostgreSQL host. The host name is assigned by MDB at creation time, and cannot be changed. 1-63 characters long.

The name is unique across all MDB hosts that exist on the platform, as it defines the FQDN of the host.

clusterId : string​

ID of the PostgreSQL host. The ID is assigned by MDB at creation time.

zoneId : string​

ID of the availability zone where the PostgreSQL host resides.

resources : Resources​

Resources allocated to the PostgreSQL host.

role : Role​

Role of the host in the cluster. If the field has default value, it is not returned in the response.

health : Health​

Aggregated health of the host. If the field has default value, it is not returned in the response.

services : Service​

Services provided by the host.

subnetId : string​

ID of the subnet that the host belongs to.

replicationSource : string​

Name of the host to be used as the replication source for cascading replication.

priority : google.protobuf.Int64Value​

Priority of the host as a replica. Higher value means higher priority.

The host with the highest priority is the synchronous replica. All others are asynchronous. The synchronous replica replaces the master when needed.

When a replica becomes the master, its priority is ignored.

config : HostConfig​

Configuration of a PostgreSQL server for the host.

assignPublicIp : bool​

Flag showing public IP assignment status to this host.

replicaType : ReplicaType​

HostConfig​

  • postgresqlConfig_9_6 : config.PostgresqlHostConfig9_6​

    Configuration for a host with PostgreSQL 9.6 server deployed.

  • postgresqlConfig_10_1c : config.PostgresqlHostConfig10_1C​

    Configuration for a host with PostgreSQL 10 1C server deployed.

  • postgresqlConfig_10 : config.PostgresqlHostConfig10​

    Configuration for a host with PostgreSQL 10 server deployed.

  • postgresqlConfig_11 : config.PostgresqlHostConfig11​

    Configuration for a host with PostgreSQL 11 server deployed.

  • postgresqlConfig_11_1c : config.PostgresqlHostConfig11_1C​

    Configuration for a host with PostgreSQL 11 1C server deployed.

  • postgresqlConfig_12 : config.PostgresqlHostConfig12​

    Configuration for a host with PostgreSQL 12 server deployed.

  • postgresqlConfig_12_1c : config.PostgresqlHostConfig12_1C​

    Configuration for a host with PostgreSQL 12 1C server deployed.

  • postgresqlConfig_13 : config.PostgresqlHostConfig13​

    Configuration for a host with PostgreSQL 13 server deployed.

  • postgresqlConfig_13_1c : config.PostgresqlHostConfig13_1C​

    Configuration for a host with PostgreSQL 13 1C server deployed.

  • postgresqlConfig_14 : config.PostgresqlHostConfig14​

    Configuration for a host with PostgreSQL 14 server deployed.

  • postgresqlConfig_14_1c : config.PostgresqlHostConfig14_1C​

    Configuration for a host with PostgreSQL 14 1C server deployed.

  • postgresqlConfig_15 : config.PostgresqlHostConfig15​

    Configuration for a host with PostgreSQL 15 server deployed.

  • postgresqlConfig_15_1c : config.PostgresqlHostConfig15_1C​

    Configuration for a host with PostgreSQL 15 1C server deployed.

  • postgresqlConfig_16 : config.PostgresqlHostConfig16​

    Configuration for a host with PostgreSQL 16 server deployed.

  • postgresqlConfig_16_1c : config.PostgresqlHostConfig16_1C​

    Configuration for a host with PostgreSQL 16 1C server deployed.

MaintenanceOperation​

A planned maintenance operation.

info : string​

Information about this maintenance operation.

delayedUntil : google.protobuf.Timestamp​

Time until which this maintenance operation is delayed.

MaintenanceWindow​

A maintenance window settings.

One of policy​

The maintenance policy in effect.

  • anytime : AnytimeMaintenanceWindow​

    Maintenance operation can be scheduled anytime.

  • weeklyMaintenanceWindow : WeeklyMaintenanceWindow​

    Maintenance operation can be scheduled on a weekly basis.

Monitoring​

Monitoring system.

name : string​

Name of the monitoring system.

description : string​

Description of the monitoring system.

Link to the monitoring system charts for the PostgreSQL cluster.

PGAuditSettings​

PGAuditSettingsLog​

  • PG_AUDIT_SETTINGS_LOG_UNSPECIFIED

  • PG_AUDIT_SETTINGS_LOG_READ

  • PG_AUDIT_SETTINGS_LOG_WRITE

  • PG_AUDIT_SETTINGS_LOG_FUNCTION

  • PG_AUDIT_SETTINGS_LOG_ROLE

  • PG_AUDIT_SETTINGS_LOG_DDL

  • PG_AUDIT_SETTINGS_LOG_MISC

  • PG_AUDIT_SETTINGS_LOG_MISC_SET

log : PGAuditSettingsLog​

Defines which user queries will be written to the audit log. Corresponds to the Pg audit log user setting.

The possible values are the following:

  • PG_AUDIT_SETTINGS_LOG_READ: SELECT and COPY queries are logged if the data source is a relation or query.
  • PG_AUDIT_SETTINGS_LOG_WRITE: INSERT, UPDATE, DELETE, TRUNCATE, and COPY queries are logged if the data target is a relation.
  • PG_AUDIT_SETTINGS_LOG_FUNCTION: Function invocations and DO sections are logged.
  • PG_AUDIT_SETTINGS_LOG_ROLE: Statements related to role and privilege management, such as GRANT, REVOKE, or CREATE/ALTER/DROP ROLE, are logged.
  • PG_AUDIT_SETTINGS_LOG_DDL: Any DDL statements that do not belong to the ROLE class are logged.
  • PG_AUDIT_SETTINGS_LOG_MISC: Miscellaneous commands, such as DISCARD, FETCH, CHECKPOINT, VACUUM, and SET, are logged.
  • PG_AUDIT_SETTINGS_LOG_MISC_SET: Miscellaneous SET commands, e.g., SET ROLE, are logged.

The default value is PG_AUDIT_SETTINGS_LOG_UNSPECIFIED. In this case, the parameter is not configured.

PerformanceDiagnostics​

enabled : bool​

Configuration setting which enables/disables performance diagnostics service in cluster.

sessionsSamplingInterval : int64​

Interval (in seconds) for pg_stat_activity sampling

statementsSamplingInterval : int64​

Interval (in seconds) for pg_stat_statements sampling

Permission​

databaseName : string​

Name of the database that the permission grants access to.

PrimaryKey​

host : string​

Host of the connected client.

user : string​

User ID.

database : string​

Database ID.

toplevel : bool​

Returns true if a query is executed as a top-level SQL statement or if the pg_stat_statements.track parameter is set to the value top.

queryId : string​

Query ID.

planId : string​

Query planning ID.

QueryStatement​

key : PrimaryKey​

Primary keys in tables with the statistics on planning and execution of queries.

stats : QueryStats​

Statistics on planning and execution of queries.

QueryStats​

time : google.protobuf.Timestamp​

Time of collecting statistics on planning and execution of queries.

query : string​

Statement text.

normalizedPlan : string​

Normalized query plan.

examplePlan : string​

Example of a query execution plan (without normalization).

plans : int64​

Number of times that a query was planned.

The parameter returns a non-zero value if the pg_stat_statements.track_planning parameter is enabled.

totalPlanTime : double​

Total time taken to plan a query, in milliseconds.

The parameter returns a non-zero value if the pg_stat_statements.track_planning parameter is enabled.

minPlanTime : double​

Minimum time taken to plan a query, in milliseconds.

The parameter returns a non-zero value if the pg_stat_statements.track_planning parameter is enabled.

maxPlanTime : double​

Maximum time taken to plan a query, in milliseconds.

The parameter returns a non-zero value if the pg_stat_statements.track_planning parameter is enabled.

meanPlanTime : double​

Average time taken to plan a query, in milliseconds.

The parameter returns a non-zero value if the pg_stat_statements.track_planning parameter is enabled.

stddevPlanTime : double​

Population standard deviation of the time taken to plan a query, in milliseconds.

The parameter returns a non-zero value if the pg_stat_statements.track_planning parameter is enabled.

calls : int64​

Number of times that a query was executed.

totalTime : double​

Total time taken to execute a query, in milliseconds.

minTime : double​

Minimum time taken to execute a query, in milliseconds.

maxTime : double​

Maximum time taken to execute a query, in milliseconds.

meanTime : double​

Average time taken to execute a query, in milliseconds.

stddevTime : double​

Population standard deviation of the time taken to execute a query, in milliseconds.

rows : int64​

Number of retrieved or affected rows.

sharedBlksHit : int64​

Number of shared blocks that are hit from cache.

sharedBlksRead : int64​

Number of read shared blocks.

sharedBlksDirtied : int64​

Number of 'dirtied' shared blocks.

sharedBlksWritten : int64​

Number of written shared blocks.

localBlksHit : int64​

Number of local blocks that are hit from cache.

localBlksRead : int64​

Number of read local blocks.

localBlksDirtied : int64​

Number of 'dirtied' local blocks.

localBlksWritten : int64​

Number of written local blocks.

tempBlksRead : int64​

Number of read temporary blocks.

tempBlksWritten : int64​

Number of written temporary blocks.

blkReadTime : double​

Time taken to read data blocks, in milliseconds.

The parameter returns a non-zero value if the track_io_timing parameter is enabled.

blkWriteTime : double​

Time taken to record data blocks, in milliseconds.

The parameter returns a non-zero value if the track_io_timing parameter is enabled.

tempBlkReadTime : double​

Time taken to read temporary data blocks, in milliseconds.

The parameter returns a non-zero value if the track_io_timing parameter is enabled.

tempBlkWriteTime : double​

Time taken to record temporary data blocks, in milliseconds.

The parameter returns a non-zero value if the track_io_timing parameter is enabled.

walRecords : int64​

Number of WAL records generated during a given period.

walFpi : int64​

Number of WAL full page images generated during a given period.

walBytes : int64​

Number of WAL logs generated during a given period, in bytes.

jitFunctions : int64​

Number of JIT-compiled functions.

jitGenerationTime : double​

Time taken to generate JIT code, in milliseconds.

jitInliningCount : int64​

Number of times that functions have been inlined.

jitInliningTime : double​

Time taken to inline functions, in milliseconds.

jitOptimizationCount : int64​

Number of times that a query was optimized.

jitOptimizationTime : double​

Time taken to optimize a query, in milliseconds.

jitEmissionCount : int64​

Number of times that code was emitted.

jitEmissionTime : double​

Time taken to emit code.

startupCost : int64​

Cost of receiving a response to a query before the first row of the response is issued.

totalCost : int64​

Cost of receiving a response to a query when all the rows of the response are issued.

planRows : int64​

Expected number of rows that a given plan node should issue.

planWidth : int64​

Expected average size of rows that a given plan node should issue.

reads : int64​

Number of bytes that the filesystem layer has read.

writes : int64​

Number of bytes that the filesystem layer has written.

userTime : double​

User CPU time used.

systemTime : double​

System CPU time used.

ResourcePreset​

A ResourcePreset resource for describing hardware configuration presets.

id : string​

ID of the ResourcePreset resource.

zoneIds : string​

IDs of availability zones where the resource preset is available.

cores : int64​

Number of CPU cores for a PostgreSQL host created with the preset.

memory : int64​

RAM volume for a PostgreSQL host created with the preset, in bytes.

Resources​

resourcePresetId : string​

ID of the preset for computational resources available to a host (CPU, memory etc.). All available presets are listed in the documentation.

diskSize : int64​

Volume of the storage available to a host, in bytes.

diskTypeId : string​

Type of the storage environment for the host. Possible values:

  • network-hdd - network HDD drive,
  • network-ssd - network SSD drive,
  • local-ssd - local SSD storage.

Service​

Type​

  • TYPE_UNSPECIFIED

    Service type of the host is unspecified. Default value.

  • POSTGRESQL

    The host is a PostgreSQL server.

  • POOLER

    The host is a PgBouncer server.

Health​

  • HEALTH_UNKNOWN

    Health of the server is unknown. Default value.

  • ALIVE

    The server is working normally.

  • DEAD

    The server is dead or unresponsive.

  • READONLY

    The server is in read-only mode.

type : Type​

Type of the service provided by the host. If the field has default value, it is not returned in the response.

health : Health​

Aggregated health of the service. If the field has default value, it is not returned in the response.

SessionState​

time : google.protobuf.Timestamp​

Time of collecting statistics on sessions (in the RFC3339 text format).

host : string​

Host of the connected client.

pid : int64​

Server process ID. For client connections, this is a client connection ID.

database : string​

Database ID.

user : string​

User ID.

applicationName : string​

Application name on the connected client.

backendStart : google.protobuf.Timestamp​

Time when a given process was started. For client connections, this is the time when the client connected to the server.

xactStart : google.protobuf.Timestamp​

Time when a transaction of a given process was started. Returns NULL if no transaction is active.

If the currently active query is the first of its transaction, the value of this parameter is equal to the value of the query_start parameter.

queryStart : google.protobuf.Timestamp​

Time when the currently active query was started.

If the state parameter does not take the value active, the parameter returns the time when the lastest query was started.

stateChange : google.protobuf.Timestamp​

Time when the state parameter was last changed.

waitEventType : string​

Type of event for which the backend is waiting. Such an event is called a wait event. A backend refers to the process that maintains the client connection.

For the list of wait events, see the PostgreSQL documentation. If the backend is not waiting for any event, the parameter returns NULL.

waitEvent : string​

Wait event name.

For the list of such names, see the PostgreSQL documentation. If the backend is not waiting for any event, the parameter returns NULL.

state : string​

Current backend state. For the list of possible values, see the PostgreSQL documentation.

query : string​

Text of the most recent query.

If the state parameter takes the value active, the parameter shows the currently executing query. For the rest of the states, the parameter shows the last query that was executed. By default, the query text is truncated to 1024 bytes.

backendType : string​

Current backend type. For the list of possible values, see the PostgreSQL documentation.

clientAddr : string​

IP address of the connected client.

The parameter returns NULL in the following cases:

  • The client is connected via a Unix socket on the server.
  • A given process is internal (for example, autovacuum).
clientHostname : string​

Host name of the connected client (relevant for IP connections).

clientPort : int64​

TCP port number that the client is using for communication with the server.

Returns -1 if the client is connected via a Unix socket on the server. Returns NULL if a given process is internal (for example, autovacuum).

backendXid : int64​

Top-level transaction ID, if any.

backendXmin : int64​

Current [xmin horizon][29].

blockingPids : string​

Process IDs that are blocking a given server process ID.

queryId : string​

Query ID.

User​

A PostgreSQL User resource. For more information, see the Developer's Guide.

name : string​

Name of the PostgreSQL user.

clusterId : string​

ID of the PostgreSQL cluster the user belongs to.

permissions : Permission​

Set of permissions granted to the user to access specific databases.

connLimit : int64​

Maximum number of database connections available to the user.

When used in session pooling, this setting limits the number of connections to every single host in PostgreSQL cluster. In this case, the setting's value must be greater than the total number of connections that backend services can open to access the PostgreSQL cluster. The setting's value should not exceed the value of the Cluster.config.postgresql_config_12.effective_config.max_connections setting.

When used in transaction pooling, this setting limits the number of user's active transactions; therefore, in this mode user can open thousands of connections, but only N concurrent connections will be opened, where N is the value of the setting.

Minimum value: 10 (default: 50), when used in session pooling.

settings : UserSettings​
login : google.protobuf.BoolValue​

This flag defines whether the user can login to a PostgreSQL database.

Default value: true (login is allowed).

grants : string​

A set of roles and privileges that are granted to the user.

For more information, see the documentation.

deletionProtection : google.protobuf.BoolValue​

Determines whether the user deletion protection is enabled.

The default value is unspecified. In this case, the user configuration inherits the cluster's deletion protection settings.

userPasswordEncryption : UserPasswordEncryption​

Password-based authentication method for user. Possible values are USER_PASSWORD_ENCRYPTION_MD5 or USER_PASSWORD_ENCRYPTION_SCRAM_SHA_256. The default is password_encryption setting for cluster.

UserSettings​

PostgreSQL user settings.

SynchronousCommit​

  • SYNCHRONOUS_COMMIT_UNSPECIFIED

  • SYNCHRONOUS_COMMIT_ON

    Success is reported to the client if the data is in WAL (Write-Ahead Log), and WAL is written to the storage of both the master and its synchronous standby server. Default value.

  • SYNCHRONOUS_COMMIT_OFF

    Success is reported to the client even if the data is not in WAL. There is no synchronous write operation, data may be loss in case of storage subsystem failure.

  • SYNCHRONOUS_COMMIT_LOCAL

    Success is reported to the client if the data is in WAL, and WAL is written to the storage of the master server. The transaction may be lost due to storage subsystem failure on the master server.

  • SYNCHRONOUS_COMMIT_REMOTE_WRITE

    Success is reported to the client if the data is in WAL, WAL is written to the storage of the master server, and the server's synchronous standby indicates that it has received WAL and written it out to its operating system. The transaction may be lost due to simultaneous storage subsystem failure on the master and operating system's failure on the synchronous standby.

  • SYNCHRONOUS_COMMIT_REMOTE_APPLY

    Success is reported to the client if the data is in WAL (Write-Ahead Log), WAL is written to the storage of the master server, and its synchronous standby indicates that it has received WAL and applied it. The transaction may be lost due to irrecoverably failure of both the master and its synchronous standby.

LogStatement​

  • LOG_STATEMENT_UNSPECIFIED

  • LOG_STATEMENT_NONE

    Logs none of SQL statements. Default value.

  • LOG_STATEMENT_DDL

    Logs all data definition statements (such as CREATE, ALTER, DROP and others).

  • LOG_STATEMENT_MOD

    Logs all statements that fall in the LOG_STATEMENT_DDL category plus data-modifying statements (such as INSERT, UPDATE and others).

  • LOG_STATEMENT_ALL

    Logs all SQL statements.

TransactionIsolation​

  • TRANSACTION_ISOLATION_UNSPECIFIED

  • TRANSACTION_ISOLATION_READ_UNCOMMITTED

    This level behaves like TRANSACTION_ISOLATION_READ_COMMITTED in PostgreSQL.

  • TRANSACTION_ISOLATION_READ_COMMITTED

    On this level query sees only data committed before the query began. Default value.

  • TRANSACTION_ISOLATION_REPEATABLE_READ

    On this level all subsequent queries in a transaction will see the same rows, that were read by the first SELECT or INSERT query in this transaction, unchanged (these rows are locked during the first query).

  • TRANSACTION_ISOLATION_SERIALIZABLE

    This level provides the strictest transaction isolation. All queries in the current transaction see only the rows that were fixed prior to execution of the first SELECT or INSERT query in this transaction. If read and write operations in a concurrent set of serializable transactions overlap and this may cause an inconsistency that is not possible during the serial transaction execution, then one of the transaction will be rolled back, triggering a serialization failure.

PoolingMode​

  • POOLING_MODE_UNSPECIFIED

  • SESSION

    Server connection will be assigned to it for the whole duration the client stays connected. Default value.

  • TRANSACTION

    Server connection is assigned to a client only during a transaction.

  • STATEMENT

    Server connection will be put back into the pool immediately after a query completes.

defaultTransactionIsolation : TransactionIsolation​

SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions.

For more information, see the PostgreSQL documentation.

lockTimeout : google.protobuf.Int64Value​

The maximum time (in milliseconds) for any statement to wait for acquiring a lock on an table, index, row or other database object. If the wait time is longer than the specified amount, then this statement is aborted.

Default value: 0 (no control is enforced, a statement waiting time is unlimited).

logMinDurationStatement : google.protobuf.Int64Value​

This setting controls logging of the duration of statements.

The duration of each completed statement will be logged if the statement ran for at least the specified amount of time (in milliseconds). E.g., if this setting's value is set to 500, a statement that took 300 milliseconds to complete will not be logged; on the other hand, the one that took 2000 milliseconds to complete, will be logged.

Value of 0 forces PostgreSQL to log the duration of all statements.

Value of -1 (default) disables logging of the duration of statements.

For more information, see the PostgreSQL documentation.

synchronousCommit : SynchronousCommit​

This setting defines whether DBMS will commit transaction in a synchronous way.

When synchronization is enabled, cluster waits for the synchronous operations to be completed prior to reporting success to the client. These operations guarantee different levels of the data safety and visibility in the cluster.

For more information, see the PostgreSQL documentation.

tempFileLimit : google.protobuf.Int64Value​

The maximum storage space size (in kilobytes) that a single process can use to create temporary files. If a transaction exceeds this limit during execution, it will be aborted.

A huge query may not fit into a server's RAM, therefore PostgreSQL will use some storage to store and execute such a query. Too big queries can make excessive use of the storage system, effectively making other quieries to run slow. This setting prevents execution of a big queries that can influence other queries by limiting size of temporary files.

logStatement : LogStatement​

This setting specifies which SQL statements should be logged (on the user level).

For more information, see the PostgreSQL documentation.

poolMode : PoolingMode​

Mode that the connection pooler is working in with specified user.

For more information, see the Odyssey documentation.

preparedStatementsPooling : google.protobuf.BoolValue​

User can use prepared statements with transaction pooling.

For more information, see the PostgreSQL documentation.

catchupTimeout : google.protobuf.Int64Value​

The connection pooler setting. It determines the maximum allowed replication lag (in seconds). Pooler will reject connections to the replica with a lag above this threshold. It can be useful to prevent application from reading stale data.

Default value: 0

Value of 0 disables this mechanism

walSenderTimeout : google.protobuf.Int64Value​

The maximum time (in milliseconds) to wait for WAL replication (can be set only for PostgreSQL 12+) Terminate replication connections that are inactive for longer than this amount of time.

Default value: 60000 (60 seconds).

Value of 0 disables the timeout mechanism.

For more information, see the PostgreSQL documentation.

idleInTransactionSessionTimeout : google.protobuf.Int64Value​

Sets the maximum allowed idle time, in milliseconds, between queries while in a transaction.

The default value is 0, which disables the timeout.

For more information, see the PostgreSQL documentation.

statementTimeout : google.protobuf.Int64Value​

The maximum time (in milliseconds) to wait for statement. The timeout is measured from the time a command arrives at the server until it is completed by the server.

If log_min_error_statement is set to ERROR or lower, the statement that timed out will also be logged.

Value of 0 (default) disables the timeout

For more information, see the PostgreSQL documentation.

pgaudit : PGAuditSettings​

Settings of the PostgreSQL Audit Extension (pgaudit).

UserSpec​

name : string​

Name of the PostgreSQL user.

password : string​

Password of the PostgreSQL user.

permissions : Permission​

Set of permissions to grant to the user to access specific databases.

connLimit : google.protobuf.Int64Value​

Maximum number of database connections that should be available to the user.

When used in session pooling, this setting limits the number of connections to every single host in PostgreSQL cluster. In this case, the setting's value must be greater than the total number of connections that backend services can open to access the PostgreSQL cluster. The setting's value should not exceed the value of the Cluster.config.postgresql_config_12.effective_config.max_connections setting.

When used in transaction pooling, this setting limits the number of user's active transactions; therefore, in this mode user can open thousands of connections, but only N concurrent connections will be opened, where N is the value of the setting.

Minimum value: 10 (default: 50), when used in session pooling.

settings : UserSettings​

PostgreSQL settings for the user.

login : google.protobuf.BoolValue​

This flag defines whether the user can login to a PostgreSQL database.

Default value: true (login is allowed).

grants : string​

A set of roles and privileges that are granted to the user.

For more information, see the documentation.

deletionProtection : google.protobuf.BoolValue​

Deletion Protection inhibits deletion of the user

Default value: unspecified (inherits cluster's deletion_protection)

userPasswordEncryption : UserPasswordEncryption​

Password-based authentication method for user. Possible values are USER_PASSWORD_ENCRYPTION_MD5 or USER_PASSWORD_ENCRYPTION_SCRAM_SHA_256. The default is password_encryption setting for cluster.

WeeklyMaintenanceWindow​

Weelky maintenance window settings.

WeekDay​

  • WEEK_DAY_UNSPECIFIED

  • MON

  • TUE

  • WED

  • THU

  • FRI

  • SAT

  • SUN

day : WeekDay​

Day of the week (in DDD format).

hour : int64​

Hour of the day in UTC (in HH format).


[29]: #sessionstatexmin horizon