Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Managed Service for PostgreSQL
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Information about existing clusters
    • Creating clusters
    • Connecting to databases
    • Stop and start the cluster
    • SQL queries in the management console
    • Changing cluster and database settings
    • Connecting to DataLens
    • Managing PostgreSQL hosts
    • Database management
    • How to manage PostgreSQL extensions
    • Managing database users
    • Granting permissions and roles
    • Managing backups
    • Deleting clusters
    • Database migration to the Cloud
    • Creating a logical replica of Amazon RDS for PostgreSQL in Managed Service for PostgreSQL
  • Solutions
    • Creating a PostgreSQL cluster for 1C
  • Concepts
    • Relationship between service resources
    • Host classes
    • Network in Yandex Managed Service for PostgreSQL
    • Quotas and limits
    • Storage types
    • Backups
    • Assigning roles
    • Replication
    • Supported clients
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1, 2019 to February 1, 2020
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BackupService
      • ClusterService
      • DatabaseService
      • ResourcePresetService
      • UserService
      • OperationService
    • REST
      • Overview
      • Backup
        • Overview
        • get
        • list
      • Cluster
        • Overview
        • addHosts
        • backup
        • create
        • delete
        • deleteHosts
        • get
        • list
        • listBackups
        • listHosts
        • listLogs
        • listOperations
        • move
        • rescheduleMaintenance
        • restore
        • start
        • startFailover
        • stop
        • streamLogs
        • update
        • updateHosts
      • Database
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • ResourcePreset
        • Overview
        • get
        • list
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Operation
        • Overview
        • get
  • Questions and answers
    • General questions
    • Questions about PostgreSQL
    • All questions on the same page
  1. API reference
  2. gRPC
  3. UserService

UserService

  • Calls UserService
  • Get
    • GetUserRequest
    • User
    • Permission
    • UserSettings
  • List
    • ListUsersRequest
    • ListUsersResponse
    • User
    • Permission
    • UserSettings
  • Create
    • CreateUserRequest
    • UserSpec
    • Permission
    • UserSettings
    • Operation
    • CreateUserMetadata
    • User
    • Permission
    • UserSettings
  • Update
    • UpdateUserRequest
    • Permission
    • UserSettings
    • Operation
    • UpdateUserMetadata
    • User
    • Permission
    • UserSettings
  • Delete
    • DeleteUserRequest
    • Operation
    • DeleteUserMetadata
  • GrantPermission
    • GrantUserPermissionRequest
    • Permission
    • Operation
    • GrantUserPermissionMetadata
    • User
    • Permission
    • UserSettings
  • RevokePermission
    • RevokeUserPermissionRequest
    • Operation
    • RevokeUserPermissionMetadata
    • User
    • Permission
    • UserSettings

A set of methods for managing PostgreSQL User resources.

Call Description
Get Returns the specified PostgreSQL User resource.
List Retrieves the list of PostgreSQL User resources in the specified cluster.
Create Creates a PostgreSQL user in the specified cluster.
Update Updates the specified PostgreSQL user.
Delete Deletes the specified PostgreSQL user.
GrantPermission Grants permission to the specified PostgreSQL user.
RevokePermission Revokes permission from the specified PostgreSQL user.

Calls UserService

Get

Returns the specified PostgreSQL User resource.
To get the list of available PostgreSQL User resources, make a List request.

rpc Get (GetUserRequest) returns (User)

GetUserRequest

Field Description
cluster_id string
Required. ID of the PostgreSQL cluster the user belongs to. To get the cluster ID, use a ClusterService.List request. The maximum string length in characters is 50.
user_name string
Required. Name of the PostgreSQL User resource to return. To get the name of the user, use a UserService.List request. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_]*.

User

Field Description
name string
Name of the PostgreSQL user.
cluster_id string
ID of the PostgreSQL cluster the user belongs to.
permissions[] Permission
Set of permissions granted to the user to access specific databases.
conn_limit 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
Roles and privileges that are granted to the user (GRANT <role> TO <user>).
For more information, see the documentation. The maximum string length in characters for each value is 63. Each value must match the regular expression [a-zA-Z0-9_]*.

Permission

Field Description
database_name string
Name of the database that the permission grants access to.

UserSettings

Field Description
default_transaction_isolation enum TransactionIsolation
SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions.
See in-depth description in PostgreSQL documentation.
  • TRANSACTION_ISOLATION_READ_UNCOMMITTED: this level behaves like TRANSACTION_ISOLATION_READ_COMMITTED in PostgreSQL.
  • TRANSACTION_ISOLATION_READ_COMMITTED: (default) on this level query sees only data committed before the query began.
  • 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.
    lock_timeout 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).
    log_min_duration_statement 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.
    See in-depth description in PostgreSQL documentation.
    synchronous_commit enum 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.
    See in-depth description in PostgreSQL documentation.
    • SYNCHRONOUS_COMMIT_ON: (default value) 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.
    • 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.
      temp_file_limit 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.
      log_statement enum LogStatement
      This setting specifies which SQL statements should be logged (on the user level).
      See in-depth description in PostgreSQL documentation.
      • LOG_STATEMENT_NONE: (default) logs none of SQL statements.
      • 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.

        List

        Retrieves the list of PostgreSQL User resources in the specified cluster.

        rpc List (ListUsersRequest) returns (ListUsersResponse)

        ListUsersRequest

        Field Description
        cluster_id string
        Required. ID of the cluster to list PostgreSQL users in. To get the cluster ID, use a ClusterService.List request. The maximum string length in characters is 50.
        page_size int64
        The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListUsersResponse.next_page_token that can be used to get the next page of results in subsequent list requests. The maximum value is 1000.
        page_token string
        Page token. To get the next page of results, set page_token to the ListUsersResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.

        ListUsersResponse

        Field Description
        users[] User
        List of PostgreSQL User resources.
        next_page_token string
        This token allows you to get the next page of results for list requests. If the number of results is larger than ListUsersRequest.page_size, use the next_page_token as the value for the ListUsersRequest.page_token parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

        User

        Field Description
        name string
        Name of the PostgreSQL user.
        cluster_id string
        ID of the PostgreSQL cluster the user belongs to.
        permissions[] Permission
        Set of permissions granted to the user to access specific databases.
        conn_limit 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
        Roles and privileges that are granted to the user (GRANT <role> TO <user>).
        For more information, see the documentation. The maximum string length in characters for each value is 63. Each value must match the regular expression [a-zA-Z0-9_]*.

        Permission

        Field Description
        database_name string
        Name of the database that the permission grants access to.

        UserSettings

        Field Description
        default_transaction_isolation enum TransactionIsolation
        SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions.
        See in-depth description in PostgreSQL documentation.
        • TRANSACTION_ISOLATION_READ_UNCOMMITTED: this level behaves like TRANSACTION_ISOLATION_READ_COMMITTED in PostgreSQL.
        • TRANSACTION_ISOLATION_READ_COMMITTED: (default) on this level query sees only data committed before the query began.
        • 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.
          lock_timeout 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).
          log_min_duration_statement 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.
          See in-depth description in PostgreSQL documentation.
          synchronous_commit enum 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.
          See in-depth description in PostgreSQL documentation.
          • SYNCHRONOUS_COMMIT_ON: (default value) 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.
          • 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.
            temp_file_limit 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.
            log_statement enum LogStatement
            This setting specifies which SQL statements should be logged (on the user level).
            See in-depth description in PostgreSQL documentation.
            • LOG_STATEMENT_NONE: (default) logs none of SQL statements.
            • 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.

              Create

              Creates a PostgreSQL user in the specified cluster.

              rpc Create (CreateUserRequest) returns (operation.Operation)

              Metadata and response of Operation:

                  Operation.metadata:CreateUserMetadata

                  Operation.response:User

              CreateUserRequest

              Field Description
              cluster_id string
              Required. ID of the PostgreSQL cluster to create a user in. To get the cluster ID, use a ClusterService.List request. The maximum string length in characters is 50.
              user_spec UserSpec
              Required. Properties of the user to be created.

              UserSpec

              Field Description
              name string
              Required. Name of the PostgreSQL user. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_]*.
              password string
              Required. Password of the PostgreSQL user. The string length in characters must be 8-128.
              permissions[] Permission
              Set of permissions to grant to the user to access specific databases.
              conn_limit 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. The minimum value is 10.
              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
              Roles and privileges that are granted to the user (GRANT <role> TO <user>).
              For more information, see the documentation. The maximum string length in characters for each value is 63. Each value must match the regular expression [a-zA-Z0-9_]*.

              Permission

              Field Description
              database_name string
              Name of the database that the permission grants access to.

              UserSettings

              Field Description
              default_transaction_isolation enum TransactionIsolation
              SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions.
              See in-depth description in PostgreSQL documentation.
              • TRANSACTION_ISOLATION_READ_UNCOMMITTED: this level behaves like TRANSACTION_ISOLATION_READ_COMMITTED in PostgreSQL.
              • TRANSACTION_ISOLATION_READ_COMMITTED: (default) on this level query sees only data committed before the query began.
              • 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.
                lock_timeout 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).
                log_min_duration_statement 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.
                See in-depth description in PostgreSQL documentation.
                synchronous_commit enum 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.
                See in-depth description in PostgreSQL documentation.
                • SYNCHRONOUS_COMMIT_ON: (default value) 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.
                • 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.
                  temp_file_limit 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.
                  log_statement enum LogStatement
                  This setting specifies which SQL statements should be logged (on the user level).
                  See in-depth description in PostgreSQL documentation.
                  • LOG_STATEMENT_NONE: (default) logs none of SQL statements.
                  • 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.

                    Operation

                    Field Description
                    id string
                    ID of the operation.
                    description string
                    Description of the operation. 0-256 characters long.
                    created_at google.protobuf.Timestamp
                    Creation timestamp.
                    created_by string
                    ID of the user or service account who initiated the operation.
                    modified_at google.protobuf.Timestamp
                    The time when the Operation resource was last modified.
                    done bool
                    If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
                    metadata google.protobuf.Any<CreateUserMetadata>
                    Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
                    result oneof: error or response
                    The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
                      error google.rpc.Status
                    The error result of the operation in case of failure or cancellation.
                      response google.protobuf.Any<User>
                    if operation finished successfully.

                    CreateUserMetadata

                    Field Description
                    cluster_id string
                    ID of the PostgreSQL cluster the user is being created in.
                    user_name string
                    Name of the user that is being created.

                    User

                    Field Description
                    name string
                    Name of the PostgreSQL user.
                    cluster_id string
                    ID of the PostgreSQL cluster the user belongs to.
                    permissions[] Permission
                    Set of permissions granted to the user to access specific databases.
                    conn_limit 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
                    Roles and privileges that are granted to the user (GRANT <role> TO <user>).
                    For more information, see the documentation. The maximum string length in characters for each value is 63. Each value must match the regular expression [a-zA-Z0-9_]*.

                    Permission

                    Field Description
                    database_name string
                    Name of the database that the permission grants access to.

                    UserSettings

                    Field Description
                    default_transaction_isolation enum TransactionIsolation
                    SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions.
                    See in-depth description in PostgreSQL documentation.
                    • TRANSACTION_ISOLATION_READ_UNCOMMITTED: this level behaves like TRANSACTION_ISOLATION_READ_COMMITTED in PostgreSQL.
                    • TRANSACTION_ISOLATION_READ_COMMITTED: (default) on this level query sees only data committed before the query began.
                    • 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.
                      lock_timeout 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).
                      log_min_duration_statement 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.
                      See in-depth description in PostgreSQL documentation.
                      synchronous_commit enum 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.
                      See in-depth description in PostgreSQL documentation.
                      • SYNCHRONOUS_COMMIT_ON: (default value) 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.
                      • 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.
                        temp_file_limit 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.
                        log_statement enum LogStatement
                        This setting specifies which SQL statements should be logged (on the user level).
                        See in-depth description in PostgreSQL documentation.
                        • LOG_STATEMENT_NONE: (default) logs none of SQL statements.
                        • 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.

                          Update

                          Updates the specified PostgreSQL user.

                          rpc Update (UpdateUserRequest) returns (operation.Operation)

                          Metadata and response of Operation:

                              Operation.metadata:UpdateUserMetadata

                              Operation.response:User

                          UpdateUserRequest

                          Field Description
                          cluster_id string
                          Required. ID of the PostgreSQL cluster the user belongs to. To get the cluster ID use a ClusterService.List request. The maximum string length in characters is 50.
                          user_name string
                          Required. Name of the user to be updated. To get the name of the user use a UserService.List request. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_]*.
                          update_mask google.protobuf.FieldMask
                          Field mask that specifies which fields of the PostgreSQL User resource should be updated.
                          password string
                          New password for the user. The string length in characters must be 8-128.
                          permissions[] Permission
                          Set of permissions granted to the user to access specific databases.
                          conn_limit 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.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. The minimum value is 10.
                          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
                          Roles and privileges that are granted to the user (GRANT <role> TO <user>).
                          For more information, see the documentation. The maximum string length in characters for each value is 63. Each value must match the regular expression [a-zA-Z0-9_]*.

                          Permission

                          Field Description
                          database_name string
                          Name of the database that the permission grants access to.

                          UserSettings

                          Field Description
                          default_transaction_isolation enum TransactionIsolation
                          SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions.
                          See in-depth description in PostgreSQL documentation.
                          • TRANSACTION_ISOLATION_READ_UNCOMMITTED: this level behaves like TRANSACTION_ISOLATION_READ_COMMITTED in PostgreSQL.
                          • TRANSACTION_ISOLATION_READ_COMMITTED: (default) on this level query sees only data committed before the query began.
                          • 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.
                            lock_timeout 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).
                            log_min_duration_statement 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.
                            See in-depth description in PostgreSQL documentation.
                            synchronous_commit enum 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.
                            See in-depth description in PostgreSQL documentation.
                            • SYNCHRONOUS_COMMIT_ON: (default value) 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.
                            • 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.
                              temp_file_limit 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.
                              log_statement enum LogStatement
                              This setting specifies which SQL statements should be logged (on the user level).
                              See in-depth description in PostgreSQL documentation.
                              • LOG_STATEMENT_NONE: (default) logs none of SQL statements.
                              • 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.

                                Operation

                                Field Description
                                id string
                                ID of the operation.
                                description string
                                Description of the operation. 0-256 characters long.
                                created_at google.protobuf.Timestamp
                                Creation timestamp.
                                created_by string
                                ID of the user or service account who initiated the operation.
                                modified_at google.protobuf.Timestamp
                                The time when the Operation resource was last modified.
                                done bool
                                If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
                                metadata google.protobuf.Any<UpdateUserMetadata>
                                Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
                                result oneof: error or response
                                The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
                                  error google.rpc.Status
                                The error result of the operation in case of failure or cancellation.
                                  response google.protobuf.Any<User>
                                if operation finished successfully.

                                UpdateUserMetadata

                                Field Description
                                cluster_id string
                                ID of the PostgreSQL cluster the user belongs to.
                                user_name string
                                Name of the user that is being updated.

                                User

                                Field Description
                                name string
                                Name of the PostgreSQL user.
                                cluster_id string
                                ID of the PostgreSQL cluster the user belongs to.
                                permissions[] Permission
                                Set of permissions granted to the user to access specific databases.
                                conn_limit 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
                                Roles and privileges that are granted to the user (GRANT <role> TO <user>).
                                For more information, see the documentation. The maximum string length in characters for each value is 63. Each value must match the regular expression [a-zA-Z0-9_]*.

                                Permission

                                Field Description
                                database_name string
                                Name of the database that the permission grants access to.

                                UserSettings

                                Field Description
                                default_transaction_isolation enum TransactionIsolation
                                SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions.
                                See in-depth description in PostgreSQL documentation.
                                • TRANSACTION_ISOLATION_READ_UNCOMMITTED: this level behaves like TRANSACTION_ISOLATION_READ_COMMITTED in PostgreSQL.
                                • TRANSACTION_ISOLATION_READ_COMMITTED: (default) on this level query sees only data committed before the query began.
                                • 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.
                                  lock_timeout 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).
                                  log_min_duration_statement 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.
                                  See in-depth description in PostgreSQL documentation.
                                  synchronous_commit enum 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.
                                  See in-depth description in PostgreSQL documentation.
                                  • SYNCHRONOUS_COMMIT_ON: (default value) 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.
                                  • 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.
                                    temp_file_limit 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.
                                    log_statement enum LogStatement
                                    This setting specifies which SQL statements should be logged (on the user level).
                                    See in-depth description in PostgreSQL documentation.
                                    • LOG_STATEMENT_NONE: (default) logs none of SQL statements.
                                    • 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.

                                      Delete

                                      Deletes the specified PostgreSQL user.

                                      rpc Delete (DeleteUserRequest) returns (operation.Operation)

                                      Metadata and response of Operation:

                                          Operation.metadata:DeleteUserMetadata

                                          Operation.response:google.protobuf.Empty

                                      DeleteUserRequest

                                      Field Description
                                      cluster_id string
                                      Required. ID of the PostgreSQL cluster the user belongs to. To get the cluster ID, use a ClusterService.List request. The maximum string length in characters is 50.
                                      user_name string
                                      Required. Name of the user to delete. To get the name of the user, use a UserService.List request. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_]*.

                                      Operation

                                      Field Description
                                      id string
                                      ID of the operation.
                                      description string
                                      Description of the operation. 0-256 characters long.
                                      created_at google.protobuf.Timestamp
                                      Creation timestamp.
                                      created_by string
                                      ID of the user or service account who initiated the operation.
                                      modified_at google.protobuf.Timestamp
                                      The time when the Operation resource was last modified.
                                      done bool
                                      If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
                                      metadata google.protobuf.Any<DeleteUserMetadata>
                                      Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
                                      result oneof: error or response
                                      The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
                                        error google.rpc.Status
                                      The error result of the operation in case of failure or cancellation.
                                        response google.protobuf.Any<google.protobuf.Empty>
                                      if operation finished successfully.

                                      DeleteUserMetadata

                                      Field Description
                                      cluster_id string
                                      ID of the PostgreSQL cluster the user belongs to.
                                      user_name string
                                      Name of the user that is being deleted.

                                      GrantPermission

                                      Grants permission to the specified PostgreSQL user.

                                      rpc GrantPermission (GrantUserPermissionRequest) returns (operation.Operation)

                                      Metadata and response of Operation:

                                          Operation.metadata:GrantUserPermissionMetadata

                                          Operation.response:User

                                      GrantUserPermissionRequest

                                      Field Description
                                      cluster_id string
                                      Required. ID of the PostgreSQL cluster the user belongs to. To get the cluster ID, use a ClusterService.List request. The maximum string length in characters is 50.
                                      user_name string
                                      Required. Name of the user to grant the permission to. To get the name of the user, use a UserService.List request. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_]*.
                                      permission Permission
                                      Required. Permission that should be granted to the specified user.

                                      Permission

                                      Field Description
                                      database_name string
                                      Name of the database that the permission grants access to.

                                      Operation

                                      Field Description
                                      id string
                                      ID of the operation.
                                      description string
                                      Description of the operation. 0-256 characters long.
                                      created_at google.protobuf.Timestamp
                                      Creation timestamp.
                                      created_by string
                                      ID of the user or service account who initiated the operation.
                                      modified_at google.protobuf.Timestamp
                                      The time when the Operation resource was last modified.
                                      done bool
                                      If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
                                      metadata google.protobuf.Any<GrantUserPermissionMetadata>
                                      Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
                                      result oneof: error or response
                                      The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
                                        error google.rpc.Status
                                      The error result of the operation in case of failure or cancellation.
                                        response google.protobuf.Any<User>
                                      if operation finished successfully.

                                      GrantUserPermissionMetadata

                                      Field Description
                                      cluster_id string
                                      ID of the PostgreSQL cluster the user belongs to. To get the cluster ID, use a ClusterService.List request.
                                      user_name string
                                      Name of the user that is being granted a permission.

                                      User

                                      Field Description
                                      name string
                                      Name of the PostgreSQL user.
                                      cluster_id string
                                      ID of the PostgreSQL cluster the user belongs to.
                                      permissions[] Permission
                                      Set of permissions granted to the user to access specific databases.
                                      conn_limit 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
                                      Roles and privileges that are granted to the user (GRANT <role> TO <user>).
                                      For more information, see the documentation. The maximum string length in characters for each value is 63. Each value must match the regular expression [a-zA-Z0-9_]*.

                                      Permission

                                      Field Description
                                      database_name string
                                      Name of the database that the permission grants access to.

                                      UserSettings

                                      Field Description
                                      default_transaction_isolation enum TransactionIsolation
                                      SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions.
                                      See in-depth description in PostgreSQL documentation.
                                      • TRANSACTION_ISOLATION_READ_UNCOMMITTED: this level behaves like TRANSACTION_ISOLATION_READ_COMMITTED in PostgreSQL.
                                      • TRANSACTION_ISOLATION_READ_COMMITTED: (default) on this level query sees only data committed before the query began.
                                      • 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.
                                        lock_timeout 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).
                                        log_min_duration_statement 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.
                                        See in-depth description in PostgreSQL documentation.
                                        synchronous_commit enum 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.
                                        See in-depth description in PostgreSQL documentation.
                                        • SYNCHRONOUS_COMMIT_ON: (default value) 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.
                                        • 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.
                                          temp_file_limit 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.
                                          log_statement enum LogStatement
                                          This setting specifies which SQL statements should be logged (on the user level).
                                          See in-depth description in PostgreSQL documentation.
                                          • LOG_STATEMENT_NONE: (default) logs none of SQL statements.
                                          • 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.

                                            RevokePermission

                                            Revokes permission from the specified PostgreSQL user.

                                            rpc RevokePermission (RevokeUserPermissionRequest) returns (operation.Operation)

                                            Metadata and response of Operation:

                                                Operation.metadata:RevokeUserPermissionMetadata

                                                Operation.response:User

                                            RevokeUserPermissionRequest

                                            Field Description
                                            cluster_id string
                                            Required. ID of the PostgreSQL cluster the user belongs to. To get the cluster ID, use a ClusterService.List request. The maximum string length in characters is 50.
                                            user_name string
                                            Required. Name of the user to revoke a permission from. To get the name of the user, use a UserService.List request. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_]*.
                                            database_name string
                                            Required. Name of the database that the user should lose access to. The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]*.

                                            Operation

                                            Field Description
                                            id string
                                            ID of the operation.
                                            description string
                                            Description of the operation. 0-256 characters long.
                                            created_at google.protobuf.Timestamp
                                            Creation timestamp.
                                            created_by string
                                            ID of the user or service account who initiated the operation.
                                            modified_at google.protobuf.Timestamp
                                            The time when the Operation resource was last modified.
                                            done bool
                                            If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
                                            metadata google.protobuf.Any<RevokeUserPermissionMetadata>
                                            Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
                                            result oneof: error or response
                                            The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
                                              error google.rpc.Status
                                            The error result of the operation in case of failure or cancellation.
                                              response google.protobuf.Any<User>
                                            if operation finished successfully.

                                            RevokeUserPermissionMetadata

                                            Field Description
                                            cluster_id string
                                            ID of the PostgreSQL cluster the user belongs to.
                                            user_name string
                                            Name of the user whose permission is being revoked.

                                            User

                                            Field Description
                                            name string
                                            Name of the PostgreSQL user.
                                            cluster_id string
                                            ID of the PostgreSQL cluster the user belongs to.
                                            permissions[] Permission
                                            Set of permissions granted to the user to access specific databases.
                                            conn_limit 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
                                            Roles and privileges that are granted to the user (GRANT <role> TO <user>).
                                            For more information, see the documentation. The maximum string length in characters for each value is 63. Each value must match the regular expression [a-zA-Z0-9_]*.

                                            Permission

                                            Field Description
                                            database_name string
                                            Name of the database that the permission grants access to.

                                            UserSettings

                                            Field Description
                                            default_transaction_isolation enum TransactionIsolation
                                            SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions.
                                            See in-depth description in PostgreSQL documentation.
                                            • TRANSACTION_ISOLATION_READ_UNCOMMITTED: this level behaves like TRANSACTION_ISOLATION_READ_COMMITTED in PostgreSQL.
                                            • TRANSACTION_ISOLATION_READ_COMMITTED: (default) on this level query sees only data committed before the query began.
                                            • 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.
                                              lock_timeout 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).
                                              log_min_duration_statement 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.
                                              See in-depth description in PostgreSQL documentation.
                                              synchronous_commit enum 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.
                                              See in-depth description in PostgreSQL documentation.
                                              • SYNCHRONOUS_COMMIT_ON: (default value) 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.
                                              • 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.
                                                temp_file_limit 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.
                                                log_statement enum LogStatement
                                                This setting specifies which SQL statements should be logged (on the user level).
                                                See in-depth description in PostgreSQL documentation.
                                                • LOG_STATEMENT_NONE: (default) logs none of SQL statements.
                                                • 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.
                                                  In this article:
                                                  • Calls UserService
                                                  • Get
                                                  • GetUserRequest
                                                  • User
                                                  • Permission
                                                  • UserSettings
                                                  • List
                                                  • ListUsersRequest
                                                  • ListUsersResponse
                                                  • User
                                                  • Permission
                                                  • UserSettings
                                                  • Create
                                                  • CreateUserRequest
                                                  • UserSpec
                                                  • Permission
                                                  • UserSettings
                                                  • Operation
                                                  • CreateUserMetadata
                                                  • User
                                                  • Permission
                                                  • UserSettings
                                                  • Update
                                                  • UpdateUserRequest
                                                  • Permission
                                                  • UserSettings
                                                  • Operation
                                                  • UpdateUserMetadata
                                                  • User
                                                  • Permission
                                                  • UserSettings
                                                  • Delete
                                                  • DeleteUserRequest
                                                  • Operation
                                                  • DeleteUserMetadata
                                                  • GrantPermission
                                                  • GrantUserPermissionRequest
                                                  • Permission
                                                  • Operation
                                                  • GrantUserPermissionMetadata
                                                  • User
                                                  • Permission
                                                  • UserSettings
                                                  • RevokePermission
                                                  • RevokeUserPermissionRequest
                                                  • Operation
                                                  • RevokeUserPermissionMetadata
                                                  • User
                                                  • Permission
                                                  • UserSettings
                                                  Language / Region
                                                  Careers
                                                  Privacy policy
                                                  Terms of use
                                                  Brandbook
                                                  © 2021 Yandex.Cloud LLC