Get a DBaaS PostgreSQL service

GET /dbaas-postgres/{name}

Get a DBaaS PostgreSQL service

Path parameters

  • name string Required

    Service name

    Minimum length is 0, maximum length is 63.

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes object
    • PGBouncer connection pooling settings

      Hide pgbouncer-settings attributes Show pgbouncer-settings attributes
    • updated-at string(date-time)

      Service last update timestamp (ISO 8601)

    • node-count integer(int64)

      Number of service nodes in the active plan

      Minimum value is 0.

    • PG connection information properties

      Hide connection-info attributes Show connection-info attributes
    • Backup schedule

      Hide backup-schedule attributes Show backup-schedule attributes
      • backup-hour integer(int64)

        The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.

        Minimum value is 0, maximum value is 23.

      • backup-minute integer(int64)

        The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.

        Minimum value is 0, maximum value is 59.

    • node-cpu-count integer(int64)

      Number of CPUs for each node

      Minimum value is 0.

    • integrations array[object]

      Service integrations

      Hide integrations attributes Show integrations attributes object
    • zone string

      The zone where the service is running

    • node-states array[object]

      Automatic maintenance settings

      Hide node-states attributes Show node-states attributes object

      Automatic maintenance settings

      • name string Required

        Name of the service node

      • progress-updates array[object]

        Extra information regarding the progress for current state

        Hide progress-updates attributes Show progress-updates attributes object

        Extra information regarding the progress for current state

        • completed boolean Required

          Indicates whether this phase has been completed or not

        • current integer(int64)

          Current progress for this phase. May be missing or null.

          Minimum value is 0.

        • max integer(int64)

          Maximum progress value for this phase. May be missing or null. May change.

          Minimum value is 0.

        • min integer(int64)

          Minimum progress value for this phase. May be missing or null.

          Minimum value is 0.

        • phase string Required

          Key identifying this phase

          Values are stream, basebackup, prepare, or finalize.

        • unit string

          Unit for current/min/max values. New units may be added. If null should be treated as generic unit

      • role string

        Role of this node. Only returned for a subset of service types

        Values are standby, master, or read-replica.

      • state string Required

        Current state of the service node

        Values are leaving, running, syncing_data, setting_up_vm, or unknown.

    • name string Required

      Service name

      Minimum length is 0, maximum length is 63.

    • connection-pools array[object]

      PostgreSQL PGBouncer connection pools

      Hide connection-pools attributes Show connection-pools attributes object
      • connection-uri string Required

        Connection URI for the DB pool

      • database string Required

        Service database name

        Minimum length is 1, maximum length is 40.

      • mode string Required

        PGBouncer pool mode

        Values are transaction, statement, or session.

      • name string Required

        Connection pool name

        Minimum length is 1, maximum length is 63.

      • size integer(int64) Required

        Size of PGBouncer's PostgreSQL side connection pool

        Minimum value is 1, maximum value is 10000.

      • username string Required

        Pool username

        Minimum length is 1, maximum length is 64.

    • type string Required

      DbaaS service name

      Minimum length is 0, maximum length is 64.

    • state string

      State of the service

      Values are running, rebuilding, rebalancing, or poweroff.

    • TimescaleDB extension configuration values

      Hide timescaledb-settings attribute Show timescaledb-settings attribute
      • The number of background workers for timescaledb operations. You should configure this setting to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time.

        Minimum value is 1, maximum value is 4096. Default value is 16.

    • databases array[string]

      Service database name

      Minimum length of each is 1, maximum length of each is 40.

    • ip-filter array[string]

      Allowed CIDR address blocks for incoming connections

    • backups array[object]

      List of backups for the service

      Hide backups attributes Show backups attributes object

      List of backups for the service

      • backup-name string Required

        Internal name of this backup

      • backup-time string(date-time) Required

        Backup timestamp (ISO 8601)

      • data-size integer(int64) Required

        Backup's original size before compression

        Minimum value is 0.

    • Service is protected against termination and powering off

    • notifications array[object]

      Service notifications

      Hide notifications attributes Show notifications attributes object

      Service notifications

      • level string Required

        Notification level

        Values are warning or notice.

      • message string Required

        Human notification message

        Minimum length is 1, maximum length is 1024.

      • type string Required

        Notification type

        Values are service_powered_off_removal or service_end_of_life.

      • metadata object Required

        Notification type

    • components array[object]

      Service component information objects

      Hide components attributes Show components attributes object
      • component string Required

        Service component name

      • host string Required

        DNS name for connecting to the service component

      • port integer(int64) Required

        Port number for connecting to the service component

        Minimum value is 0, maximum value is 65535.

      • route string Required

        Network access route

        Values are dynamic, private, public, or privatelink.

      • usage string Required

        DNS usage name

        Values are primary or replica.

    • Synchronous replication type. Note that the service plan also needs to support synchronous replication.

      Values are quorum or off.

    • PGLookout settings

      Hide pglookout-settings attribute Show pglookout-settings attribute
      • Number of seconds of master unavailability before triggering database failover to standby

        Minimum value is 10, maximum value is 9223372036854775807. Default value is 60.

    • Automatic maintenance settings

      Hide maintenance attributes Show maintenance attributes
      • dow string Required

        Day of week for installing updates

        Values are saturday, tuesday, never, wednesday, sunday, friday, monday, or thursday.

      • time string Required

        Time for installing updates, UTC

        Minimum length is 8, maximum length is 8.

      • updates array[object] Required

        Update waiting to be installed

        Hide updates attributes Show updates attributes object

        Update waiting to be installed

        • Description of the update

        • deadline string(date-time)

          Deadline for installing the update

        • start-after string(date-time)

          The earliest time the update will be automatically applied

        • start-at string(date-time)

          The time when the update will be automatically applied

    • disk-size integer(int64)

      TODO UNIT disk space for data storage

      Minimum value is 0.

    • node-memory integer(int64)

      TODO UNIT of memory for each node

      Minimum value is 0.

    • uri string

      URI for connecting to the service (may be absent)

    • service_uri parameterized into key-value pairs

    • version string

      PostgreSQL version

    • created-at string(date-time)

      Service creation timestamp (ISO 8601)

    • plan string Required

      Subscription plan

    • work-mem integer(int64)

      Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).

      Minimum value is 1, maximum value is 1024.

    • Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.

      Minimum value is 20, maximum value is 60.

    • PostgreSQL-specific settings

      Hide pg-settings attributes Show pg-settings attributes
      • Specifies the number of bytes reserved to track the currently executing command for each active session.

        Minimum value is 1024, maximum value is 10240.

      • timezone string

        PostgreSQL service timezone

        Maximum length is 64. Format should match the following pattern: ^[\w/]*$.

      • Enables timing of database I/O calls. This parameter is off by default, because it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms.

        Values are off or on.

      • Enables or disables query plan monitoring

      • PostgreSQL maximum number of files that can be open per process

        Minimum value is 1000, maximum value is 4096.

      • Sets the maximum number of buckets

        Minimum value is 1, maximum value is 10.

      • wal object
        Hide wal attributes Show wal attributes
        • PostgreSQL maximum WAL size (MB) reserved for replication slots. Default is -1 (unlimited). wal_keep_size minimum WAL size setting takes precedence over this.

          Minimum value is -1, maximum value is 2147483647.

        • PostgreSQL maximum WAL senders

          Minimum value is 20, maximum value is 64.

        • Terminate replication connections that are inactive for longer than this amount of time, in milliseconds.

          Minimum value is 0, maximum value is 10800000.

        • WAL flush interval in milliseconds. Note that setting this value to lower than the default 200ms may negatively impact performance

          Minimum value is 10, maximum value is 200.

      • Specifies the default TOAST compression method for values of compressible columns (the default is lz4).

        Values are lz4 or pglz.

      • This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition.

        Minimum value is 500, maximum value is 1800000.

      • Time out sessions with open transactions after this number of milliseconds

        Minimum value is 0, maximum value is 604800000.

      • PostgreSQL maximum predicate locks per transaction

        Minimum value is 64, maximum value is 5120.

      • PostgreSQL maximum replication slots

        Minimum value is 8, maximum value is 64.

      • Hide autovacuum attributes Show autovacuum attributes
        • Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one (the default) disables logging autovacuum actions.

          Minimum value is -1, maximum value is 2147483647.

        • Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used.

          Minimum value is -1, maximum value is 10000.

        • Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start.

          Minimum value is 1, maximum value is 20.

        • Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples

          Minimum value is 0, maximum value is 2147483647.

        • Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds, and the default is one minute

          Minimum value is 1, maximum value is 86400.

        • Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of table size)

          Minimum value is 0.0, maximum value is 1.0.

        • Specifies the cost delay value that will be used in automatic VACUUM operations. If -1 is specified, the regular vacuum_cost_delay value will be used. The default value is 20 milliseconds

          Minimum value is -1, maximum value is 100.

        • Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE. The default is 0.2 (20% of table size)

          Minimum value is 0.0, maximum value is 1.0.

        • Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50 tuples.

          Minimum value is 0, maximum value is 2147483647.

        • Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. This parameter will cause the server to be restarted.

          Minimum value is 200000000, maximum value is 1500000000.

      • Sets the maximum number of workers that can be started by a single Gather or Gather Merge node

        Minimum value is 0, maximum value is 96.

      • Sets the time interval to run pg_partman's scheduled tasks

        Minimum value is 3600, maximum value is 604800.

      • Choose from one of the available log-formats. These can support popular log analyzers like pgbadger, pganalyze etc.

        Values are 'pid=%p,user=%u,db=%d,app=%a,client=%h ', '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h ', or '%m [%p] %q[user=%u,db=%d,app=%a] '.

      • Log statements for each temporary file created larger than this number of kilobytes, -1 disables

        Minimum value is -1, maximum value is 2147483647.

      • PostgreSQL maximum locks per transaction

        Minimum value is 64, maximum value is 6400.

      • Record commit time of transactions.

        Values are off or on.

      • Enables tracking of function call counts and time used.

        Values are all, pl, or none.

      • Maximum depth of the stack in bytes

        Minimum value is 2097152, maximum value is 6291456.

      • Sets the maximum number of workers that the system can support for parallel queries

        Minimum value is 0, maximum value is 96.

      • Controls which role to use for pg_partman's scheduled background tasks.

        Maximum length is 64. Format should match the following pattern: ^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$.

      • PostgreSQL maximum logical replication workers (taken from the pool of max_parallel_workers)

        Minimum value is 4, maximum value is 64.

      • PostgreSQL maximum prepared transactions

        Minimum value is 0, maximum value is 10000.

      • Sets the maximum number of background processes that the system can support

        Minimum value is 8, maximum value is 96.

      • Controls which statements are counted. Specify top to track top-level statements (those issued directly by clients), all to also track nested statements (such as statements invoked within functions), or none to disable statement statistics collection. The default value is top.

        Values are all, top, or none.

      • PostgreSQL temporary file limit in KiB, -1 for unlimited

        Minimum value is -1, maximum value is 2147483647.

      • Controls the amount of detail written in the server log for each message that is logged.

        Values are TERSE, DEFAULT, or VERBOSE.

      • Log statements that take more than this number of milliseconds to run, -1 disables

        Minimum value is -1, maximum value is 86400000.

      • Max standby streaming delay in milliseconds

        Minimum value is 1, maximum value is 43200000.

      • jit boolean

        Controls system-wide use of Just-in-Time Compilation (JIT).

      • Max standby archive delay in milliseconds

        Minimum value is 1, maximum value is 43200000.

      • Hide bg-writer attributes Show bg-writer attributes
        • Specifies the delay between activity rounds for the background writer in milliseconds. Default is 200.

          Minimum value is 10, maximum value is 10000.

        • Whenever more than bgwriter_flush_after bytes have been written by the background writer, attempt to force the OS to issue these writes to the underlying storage. Specified in kilobytes, default is 512. Setting of 0 disables forced writeback.

          Minimum value is 0, maximum value is 2048.

        • In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. Default is 100.

          Minimum value is 0, maximum value is 1073741823.

        • The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0.

          Minimum value is 0, maximum value is 10.

    • max-connections integer(int64)

      Maximum number of connections allowed to an instance

      Minimum value is 0.

    • users array[object]

      List of service users

      Hide users attributes Show users attributes object

      List of service users

GET /dbaas-postgres/{name}
curl \
 -X GET https://api-ch-gva-2.exoscale.com/v2/dbaas-postgres/{name}
Response examples (200)
{
  "pgbouncer-settings": {
    "min_pool_size": 0,
    "ignore_startup_parameters": [
      "extra_float_digits",
      "search_path"
    ],
    "server_lifetime": 3600,
    "autodb_pool_mode": "session",
    "server_idle_timeout": 600,
    "autodb_max_db_connections": 0,
    "server_reset_query_always": false,
    "autodb_pool_size": 0,
    "autodb_idle_timeout": 3600
  },
  "updated-at": "2024-05-04T09:42:00+00:00",
  "node-count": 42,
  "connection-info": {
    "uri": [
      "string"
    ],
    "params": [
      {
        "key": "string"
      }
    ],
    "standby": [
      "string"
    ],
    "syncing": [
      "string"
    ]
  },
  "backup-schedule": {
    "backup-hour": 42,
    "backup-minute": 42
  },
  "node-cpu-count": 42,
  "integrations": [
    {
      "description": "string",
      "settings": {},
      "type": "string",
      "is-enabled": true,
      "source": "string",
      "is-active": true,
      "status": "string",
      "id": "string",
      "dest": "string"
    }
  ],
  "zone": "string",
  "node-states": [
    {
      "name": "string",
      "progress-updates": [
        {
          "completed": true,
          "current": 42,
          "max": 42,
          "min": 42,
          "phase": "stream",
          "unit": "string"
        }
      ],
      "role": "standby",
      "state": "leaving"
    }
  ],
  "name": "string",
  "connection-pools": [
    {
      "connection-uri": "string",
      "database": "string",
      "mode": "transaction",
      "name": "string",
      "size": 42,
      "username": "string"
    }
  ],
  "type": "string",
  "state": "running",
  "timescaledb-settings": {
    "max_background_workers": 8
  },
  "databases": [
    "string"
  ],
  "ip-filter": [
    "string"
  ],
  "backups": [
    {
      "backup-name": "string",
      "backup-time": "2024-05-04T09:42:00+00:00",
      "data-size": 42
    }
  ],
  "termination-protection": true,
  "notifications": [
    {
      "level": "warning",
      "message": "string",
      "type": "service_powered_off_removal",
      "metadata": {}
    }
  ],
  "components": [
    {
      "component": "string",
      "host": "string",
      "port": 42,
      "route": "dynamic",
      "usage": "primary"
    }
  ],
  "synchronous-replication": "quorum",
  "pglookout-settings": {
    "max_failover_replication_time_lag": 60
  },
  "maintenance": {
    "dow": "saturday",
    "time": "string",
    "updates": [
      {
        "description": "string",
        "deadline": "2024-05-04T09:42:00+00:00",
        "start-after": "2024-05-04T09:42:00+00:00",
        "start-at": "2024-05-04T09:42:00+00:00"
      }
    ]
  },
  "disk-size": 42,
  "node-memory": 42,
  "uri": "string",
  "uri-params": {},
  "version": "string",
  "created-at": "2024-05-04T09:42:00+00:00",
  "plan": "string",
  "work-mem": 42,
  "shared-buffers-percentage": 42,
  "pg-settings": {
    "track_activity_query_size": 1024,
    "timezone": "Europe/Helsinki",
    "track_io_timing": "off",
    "pg_stat_monitor.pgsm_enable_query_plan": false,
    "max_files_per_process": 42,
    "pg_stat_monitor.pgsm_max_buckets": 10,
    "wal": {
      "max_slot_wal_keep_size": 42,
      "max_wal_senders": 42,
      "wal_sender_timeout": 42,
      "wal_writer_delay": 50
    },
    "default_toast_compression": "lz4",
    "deadlock_timeout": 1000,
    "idle_in_transaction_session_timeout": 42,
    "max_pred_locks_per_transaction": 42,
    "max_replication_slots": 42,
    "autovacuum": {
      "log_autovacuum_min_duration": 42,
      "autovacuum_vacuum_cost_limit": 42,
      "autovacuum_max_workers": 42,
      "autovacuum_vacuum_threshold": 42,
      "autovacuum_naptime": 42,
      "autovacuum_vacuum_scale_factor": 42.0,
      "autovacuum_vacuum_cost_delay": 42,
      "autovacuum_analyze_scale_factor": 42.0,
      "autovacuum_analyze_threshold": 42,
      "autovacuum_freeze_max_age": 200000000
    },
    "max_parallel_workers_per_gather": 42,
    "pg_partman_bgw.interval": 3600,
    "log_line_prefix": "'pid=%p,user=%u,db=%d,app=%a,client=%h '",
    "log_temp_files": 42,
    "max_locks_per_transaction": 42,
    "track_commit_timestamp": "off",
    "track_functions": "all",
    "max_stack_depth": 42,
    "max_parallel_workers": 42,
    "pg_partman_bgw.role": "myrolename",
    "max_logical_replication_workers": 42,
    "max_prepared_transactions": 42,
    "max_worker_processes": 42,
    "pg_stat_statements.track": "all",
    "temp_file_limit": 5000000,
    "log_error_verbosity": "TERSE",
    "log_min_duration_statement": 42,
    "max_standby_streaming_delay": 42,
    "jit": true,
    "max_standby_archive_delay": 42,
    "bg-writer": {
      "bgwriter_delay": 200,
      "bgwriter_flush_after": 512,
      "bgwriter_lru_maxpages": 100,
      "bgwriter_lru_multiplier": 2.0
    }
  },
  "max-connections": 42,
  "users": [
    {
      "type": "string",
      "username": "string",
      "password": "string",
      "allow-replication": true
    }
  ]
}