> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update PostgreSQL cluster

> Update the configuration of an existing PostgreSQL cluster.



## OpenAPI

````yaml /api-reference/services_documented/cloud_api.yaml patch /cloud/v1/dbaas/postgres/clusters/{project_id}/{region_id}/{cluster_name}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Cloud API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-14T07:00:22.640261+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
    x-displayName: Bare Metal
  - name: Container as a Service
    x-displayName: Container as a Service
  - name: Cost Reports
    x-displayName: Cost Reports
  - name: DDoS Protection
    x-displayName: DDoS Protection
  - name: Everywhere Inference
    x-displayName: Everywhere Inference
  - name: Everywhere Inference Apps
    x-displayName: Everywhere Inference Apps
  - name: File Shares
    x-displayName: File Shares
  - name: Floating IPs
    x-displayName: Floating IPs
  - name: Function as a Service
    x-displayName: Function as a Service
  - name: GPU Bare Metal
    x-displayName: GPU Bare Metal
  - name: GPU Virtual
    x-displayName: GPU Virtual
  - name: IP Ranges
    x-displayName: IP Ranges
  - name: Images
    x-displayName: Images
  - name: Instances
    x-displayName: Instances
  - name: Load Balancers
    x-displayName: Load Balancers
  - name: Logging
    x-displayName: Logging
  - name: Managed Kubernetes
    x-displayName: Managed Kubernetes
  - name: Managed PostgreSQL
    x-displayName: Managed PostgreSQL
  - name: Networks
    x-displayName: Networks
  - name: Placement Groups
    x-displayName: Placement Groups
  - name: Projects
    x-displayName: Projects
  - name: Quotas
    x-displayName: Quotas
  - name: Regions
    x-displayName: Regions
  - name: Registry
    x-displayName: Registry
  - name: Reservations
    x-displayName: Reservations
  - name: Reserved IPs
    x-displayName: Reserved IPs
  - name: Routers
    x-displayName: Routers
  - name: SSH Keys
    x-displayName: SSH Keys
  - name: Secrets
    x-displayName: Secrets
  - name: Security Groups
    x-displayName: Security Groups
  - name: Snapshot Schedules
    x-displayName: Snapshot Schedules
  - name: Snapshots
    x-displayName: Snapshots
  - name: Tasks
    x-displayName: Tasks
  - name: User Actions
    x-displayName: User Actions
  - name: User Role Assignments
    x-displayName: User Role Assignments
  - name: Volumes
    x-displayName: Volumes
paths:
  /cloud/v1/dbaas/postgres/clusters/{project_id}/{region_id}/{cluster_name}:
    patch:
      tags:
        - Managed PostgreSQL
      summary: Update PostgreSQL cluster
      description: Update the configuration of an existing PostgreSQL cluster.
      operationId: PGClusterViewSet.patch
      parameters:
        - in: path
          name: project_id
          required: true
          description: Project ID
          schema:
            description: Project ID
            title: Project Id
            type: integer
        - in: path
          name: region_id
          required: true
          description: Region ID
          schema:
            description: Region ID
            title: Region Id
            type: integer
        - in: path
          name: cluster_name
          required: true
          description: Cluster name
          schema:
            description: Cluster name
            title: Cluster Name
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchPGClusterSerializer'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIDsSerializer'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            task_id_list = client.cloud.databases.postgres.clusters.update(
                cluster_name="cluster_name",
                project_id=0,
                region_id=0,
            )
            print(task_id_list.tasks)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/cloud\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttaskIDList, err := client.Cloud.Databases.Postgres.Clusters.Update(\n\t\tcontext.TODO(),\n\t\t\"cluster_name\",\n\t\tcloud.DatabasePostgresClusterUpdateParams{\n\t\t\tProjectID: gcore.Int(0),\n\t\t\tRegionID:  gcore.Int(0),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", taskIDList.Tasks)\n}\n"
components:
  schemas:
    PatchPGClusterSerializer:
      properties:
        databases:
          default: []
          items:
            $ref: '#/components/schemas/Database'
          title: Databases
          type: array
        flavor:
          anyOf:
            - $ref: '#/components/schemas/Flavor'
            - type: 'null'
          default: null
          description: New instance RAM and CPU
        high_availability:
          anyOf:
            - $ref: '#/components/schemas/HighAvailabilityOptions'
            - type: 'null'
          default: null
          description: New High Availability settings
        network:
          anyOf:
            - $ref: '#/components/schemas/PublicNetwork'
            - type: 'null'
          default: null
          title: Network
        pg_server_configuration:
          anyOf:
            - $ref: '#/components/schemas/PatchPostgreSQLServerConfig'
            - type: 'null'
          default: null
          description: New PosgtreSQL cluster configuration
        storage:
          anyOf:
            - $ref: '#/components/schemas/StorageSize'
            - type: 'null'
          default: null
          description: New storage configuration
        users:
          default: []
          items:
            $ref: '#/components/schemas/PgUser'
          title: Users
          type: array
      title: PatchPGClusterSerializer
      type: object
    TaskIDsSerializer:
      properties:
        tasks:
          description: >-
            List of task IDs representing asynchronous operations. Use these IDs
            to monitor operation progress:

            - `GET /v1/tasks/{task_id}` - Check individual task status and
            details

            Poll task status until completion (`FINISHED`/`ERROR`) before
            proceeding with dependent operations.
          example:
            - d478ae29-dedc-4869-82f0-96104425f565
          examples:
            - - d478ae29-dedc-4869-82f0-96104425f565
          items:
            type: string
          title: Tasks
          type: array
      required:
        - tasks
      title: TaskIDsSerializer
      type: object
    Database:
      properties:
        name:
          description: Database name
          example: mydatabase
          examples:
            - mydatabase
          pattern: ^[a-z]*$
          title: Name
          type: string
        owner:
          description: Database owner from users list
          example: myuser
          examples:
            - myuser
          title: Owner
          type: string
      required:
        - name
        - owner
      title: Database
      type: object
    Flavor:
      properties:
        cpu:
          description: Maximum available cores for instance
          example: 1
          examples:
            - 1
            - 2
          minimum: 1
          title: Cpu
          type: integer
        memory_gib:
          description: Maximum available RAM for instance
          example: 1
          examples:
            - 1
            - 2
          minimum: 1
          title: Memory Gib
          type: integer
      required:
        - cpu
        - memory_gib
      title: Flavor
      type: object
    HighAvailabilityOptions:
      properties:
        replication_mode:
          $ref: '#/components/schemas/ReplicationMode'
          description: Type of replication
          examples:
            - sync
            - async
      required:
        - replication_mode
      title: HighAvailabilityOptions
      type: object
    PublicNetwork:
      properties:
        acl:
          description: Allowed IPs and subnets for incoming traffic
          example:
            - 92.33.34.127
          examples:
            - - 92.33.34.127
          items:
            format: ipvanyinterface
            type: string
          title: Acl
          type: array
        network_type:
          const: public
          description: Network Type
          example: public
          examples:
            - public
          title: Network Type
          type: string
      required:
        - network_type
        - acl
      title: PublicNetwork
      type: object
    PatchPostgreSQLServerConfig:
      properties:
        pg_conf:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: New pg.conf file settings
          examples:
            - |-

              listen_addresses = 'localhost'
              port = 5432
              max_connections = 100
              shared_buffers = 128MB
              logging_collector = on
          title: Pg Conf
        pooler:
          anyOf:
            - $ref: '#/components/schemas/PoolerConfigurationSchema'
            - type: 'null'
          default: null
          examples:
            - null
          title: Pooler configuration for master
        version:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: New cluster version
          examples:
            - '15'
          title: Version
      title: PatchPostgreSQLServerConfig
      type: object
    StorageSize:
      properties:
        size_gib:
          description: Total available storage for database
          example: 100
          examples:
            - 100
          maximum: 100
          minimum: 1
          title: Size Gib
          type: integer
      required:
        - size_gib
      title: StorageSize
      type: object
    PgUser:
      properties:
        name:
          description: User name
          example: myuser
          examples:
            - myuser
          pattern: ^[a-z]*$
          title: Name
          type: string
        role_attributes:
          description: User's attributes
          example:
            - INHERIT
          examples:
            - - INHERIT
          items:
            enum:
              - BYPASSRLS
              - CREATEDB
              - CREATEROLE
              - INHERIT
              - LOGIN
              - NOLOGIN
            type: string
          title: Role Attributes
          type: array
          uniqueItems: true
      required:
        - name
        - role_attributes
      title: PgUser
      type: object
    ReplicationMode:
      enum:
        - async
        - sync
      title: ReplicationMode
      type: string
    PoolerConfigurationSchema:
      properties:
        mode:
          $ref: '#/components/schemas/PoolerModes'
          examples:
            - transaction
        type:
          const: pgbouncer
          default: pgbouncer
          example: pgbouncer
          examples:
            - pgbouncer
          title: Type
          type: string
      required:
        - mode
      title: PoolerConfigurationSchema
      type: object
    PoolerModes:
      enum:
        - session
        - statement
        - transaction
      title: PoolerModes
      type: string
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````