---
title: "Get a DBaaS PostgreSQL service"
method: GET
path: "/dbaas-postgres/{name}"
tags: ["dbaas"]
---

# Get a DBaaS PostgreSQL service

`GET /dbaas-postgres/{name}`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/dbaas-postgres/{name}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/dbaas-postgres/:name/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a DBaaS PostgreSQL service

## Path parameters

- `name` string, required

## Response `200`

200

- DbaasServicePg
  - `pgbouncer-settings` JsonSchemaPgbouncer: System-wide settings for pgbouncer.
    - `min_pool_size` integer
    - `ignore_startup_parameters` string[]
    - `server_lifetime` integer
    - `autodb_pool_mode` 'transaction' | 'session' | 'statement'
    - `server_idle_timeout` integer
    - `autodb_max_db_connections` integer
    - `max_prepared_statements` integer
    - `server_reset_query_always` boolean
    - `autodb_pool_size` integer
    - `autodb_idle_timeout` integer
  - `updated-at` string, date-time: Service last update timestamp (ISO 8601)
  - `node-count` integer: Number of service nodes in the active plan
  - `connection-info` object: PG connection information properties
    - `uri` string[]
    - `params` object[]
    - `standby` string[]
    - `syncing` string[]
  - `backup-schedule` object: Backup schedule
    - `backup-hour` integer: The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.
    - `backup-minute` integer: The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.
  - `node-cpu-count` integer: Number of CPUs for each node
  - `prometheus-uri` object, required: Prometheus integration URI
    - `host` string
    - `port` integer
  - `integrations` DbaasIntegration[]: Service integrations
    - `description` string: Description of the integration
    - `settings` object: Integration settings
    - `type` string: Integration type
    - `is-enabled` boolean: Whether the integration is enabled or not
    - `source` string: Source service name
    - `is-active` boolean: Whether the integration is active or not
    - `status` string: Integration status
    - `id` string, uuid: Integration id
    - `dest` string: Destination service name
  - `zone` string: The zone where the service is running
  - `node-states` DbaasNodeState[]: State of individual service nodes
    - `name` string, required: Name of the service node
    - `progress-updates` DbaasNodeStateProgressUpdate[]: Extra information regarding the progress for current state
      - `completed` boolean, required: Indicates whether this phase has been completed or not
      - `current` integer: Current progress for this phase. May be missing or null.
      - `max` integer: Maximum progress value for this phase. May be missing or null. May change.
      - `min` integer: Minimum progress value for this phase. May be missing or null.
      - `phase` 'stream' | 'basebackup' | 'prepare' | 'finalize', required: Key identifying this phase
      - `unit` string: Unit for current/min/max values. New units may be added. If null should be treated as generic unit
    - `role` 'standby' | 'master' | 'read-replica': Role of this node. Only returned for a subset of service types
    - `state` 'leaving' | 'running' | 'syncing_data' | 'setting_up_vm' | 'unknown', required: Current state of the service node
  - `name` string, required
  - `connection-pools` object[]: PostgreSQL PGBouncer connection pools
    - `connection-uri` string, required: Connection URI for the DB pool
    - `database` string, required
    - `mode` 'transaction' | 'statement' | 'session', required
    - `name` string, required
    - `size` integer, required
    - `username` string, required
  - `type` string, required
  - `state` 'running' | 'rebuilding' | 'rebalancing' | 'poweroff'
  - `timescaledb-settings` JsonSchemaTimescaledb: System-wide settings for the timescaledb extension
    - `max_background_workers` integer: 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. Changing this parameter causes a service restart.
  - `databases` DbaasDatabaseName[]: List of PostgreSQL databases
  - `ip-filter` string[]: Allowed CIDR address blocks for incoming connections
  - `backups` DbaasServiceBackup[]: 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, required: Backup's original size before compression
  - `termination-protection` boolean: Service is protected against termination and powering off
  - `pgaudit-settings` JsonSchemaPgaudit: System-wide settings for the pgaudit extension.
    - `role` string: Specifies the master role to use for object audit logging.
    - `log_parameter` boolean: Specifies that audit logging should include the parameters that were passed with the statement.
    - `log_rows` boolean
    - `log_level` 'debug1' | 'debug2' | 'debug3' | 'debug4' | 'debug5' | 'info' | 'notice' | 'warning' | 'log': Specifies the log level that will be used for log entries.
    - `log_relation` boolean: Specifies whether session audit logging should create a separate log entry for each relation (TABLE, VIEW, etc.) referenced in a SELECT or DML statement.
    - `log_statement_once` boolean: Specifies whether logging will include the statement text and parameters with the first log entry for a statement/substatement combination or with every entry.
    - `log_max_string_length` integer: Crop parameters representation and whole statements if they exceed this threshold. A (default) value of -1 disable the truncation.
    - `log_catalog` boolean: Specifies that session logging should be enabled in the case where all relations in a statement are in pg_catalog.
    - `log_nested_statements` boolean: This GUC allows to turn off logging nested statements, that is, statements that are executed as part of another ExecutorRun.
    - `log_statement` boolean: Specifies whether logging will include the statement text and parameters (if enabled).
    - `log_client` boolean: Specifies whether log messages will be visible to a client process such as psql.
    - `feature_enabled` boolean: Enable pgaudit extension. When enabled, pgaudit extension will be automatically installed.Otherwise, extension will be uninstalled but auditing configurations will be preserved.
    - `log` string[]: Specifies which classes of statements will be logged by session audit logging.
    - `log_parameter_max_size` integer: Specifies that parameter values longer than this setting (in bytes) should not be logged, but replaced with <long param suppressed>.
  - `notifications` DbaasServiceNotification[]: Service notifications
    - `level` 'warning' | 'notice', required: Notification level
    - `message` string, required: Human notification message
    - `type` 'service_powered_off_removal' | 'service_end_of_life', required: Notification type
    - `metadata` object, required: Notification type
  - `components` object[]: Service component information objects
    - `component` string, required: Service component name
    - `host` string, required: DNS name for connecting to the service component
    - `port` integer, required: Port number for connecting to the service component
    - `route` 'dynamic' | 'private' | 'public' | 'privatelink', required
    - `usage` 'primary' | 'replica', required
  - `synchronous-replication` 'quorum' | 'off'
  - `pglookout-settings` JsonSchemaPglookout: System-wide settings for pglookout.
    - `max_failover_replication_time_lag` integer: Number of seconds of master unavailability before triggering database failover to standby
  - `maintenance` DbaasServiceMaintenance: Automatic maintenance settings
    - `dow` 'saturday' | 'tuesday' | 'never' | 'wednesday' | 'sunday' | 'friday' | 'monday' | 'thursday', required: Day of week for installing updates
    - `time` string, required: Time for installing updates, UTC
    - `updates` DbaasServiceUpdate[], required: List of updates waiting to be installed
      - `description` string: 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: TODO UNIT disk space for data storage
  - `node-memory` integer: TODO UNIT of memory for each node
  - `uri` string: URI for connecting to the service (may be absent)
  - `uri-params` object: 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: 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).
  - `shared-buffers-percentage` integer: 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.
  - `pg-settings` JsonSchemaPg
    - `track_activity_query_size` integer: Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart.
    - `timezone` string: PostgreSQL service timezone
    - `track_io_timing` 'off' | 'on': Enables timing of database I/O calls. The default is `off`. When on, it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms.
    - `pg_stat_monitor.pgsm_enable_query_plan` boolean: Enables or disables query plan monitoring. Changing this parameter causes a service restart. Only available for PostgreSQL 13+.
    - `max_files_per_process` integer: PostgreSQL maximum number of files that can be open per process. The default is `1000` (upstream default). Changing this parameter causes a service restart.
    - `pg_stat_monitor.pgsm_max_buckets` integer: Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+.
    - `io_max_concurrency` integer: EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart.
    - `wal` object
      - `max_slot_wal_keep_size` integer: PostgreSQL maximum WAL size (MB) reserved for replication slots. If `-1` is specified, replication slots may retain an unlimited amount of WAL files. The default is `-1` (upstream default). wal_keep_size minimum WAL size setting takes precedence over this.
      - `max_wal_senders` integer: PostgreSQL maximum WAL senders. The default is `20`. Changing this parameter causes a service restart.
      - `wal_sender_timeout` integer: Terminate replication connections that are inactive for longer than this amount of time, in milliseconds.
      - `wal_writer_delay` integer: WAL flush interval in milliseconds. The default is `200`. Setting this parameter to a lower value may negatively impact performance.
    - `default_toast_compression` 'lz4' | 'pglz': Specifies the default TOAST compression method for values of compressible columns. The default is `lz4`. Only available for PostgreSQL 14+.
    - `deadlock_timeout` integer: This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The default is `1000` (upstream default).
    - `idle_in_transaction_session_timeout` integer: Time out sessions with open transactions after this number of milliseconds
    - `max_pred_locks_per_transaction` integer: PostgreSQL maximum predicate locks per transaction. The default is `64` (upstream default). Changing this parameter causes a service restart.
    - `max_replication_slots` integer: PostgreSQL maximum replication slots. The default is `20`. Changing this parameter causes a service restart.
    - `max_sync_workers_per_subscription` integer: Maximum number of synchronization workers per subscription. The default is `2`.
    - `autovacuum` object
      - `log_autovacuum_min_duration` integer: 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 disables logging autovacuum actions. The default is `1000`.
      - `autovacuum_vacuum_cost_limit` integer: Specifies the cost limit value that will be used in automatic VACUUM operations. If `-1` is specified, the regular vacuum_cost_limit value will be used. The default is `-1` (upstream default).
      - `autovacuum_max_workers` integer: Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is `3`. Changing this parameter causes a service restart.
      - `autovacuum_vacuum_threshold` integer: Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is `50`.
      - `autovacuum_naptime` integer: Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is `60`.
      - `autovacuum_vacuum_scale_factor` number: Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM (e.g. `0.2` for 20% of the table size). The default is `0.2`.
      - `autovacuum_vacuum_cost_delay` integer: 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 is `2` (upstream default).
      - `autovacuum_analyze_scale_factor` number: Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE (e.g. `0.2` for 20% of the table size). The default is `0.2`.
      - `autovacuum_analyze_threshold` integer: Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is `50`.
      - `autovacuum_freeze_max_age` integer: 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. The system launches autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. Changing this parameter causes a service restart.
    - `max_parallel_workers_per_gather` integer: Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is `2` (upstream default).
    - `io_combine_limit` integer: EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units. Version 17 and up only.
    - `password_encryption` 'md5' | 'scram-sha-256', nullable: Chooses the algorithm for encrypting passwords.
    - `io_workers` integer: EXPERIMENTAL: Number of IO worker processes, for io_method=worker. Version 18 and up only. Changing this parameter causes a service restart.
    - `pg_partman_bgw.interval` integer: Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is `3600`.
    - `log_line_prefix` ''pid=%p,user=%u,db=%d,app=%a,client=%h '' | ''pid=%p,user=%u,db=%d,app=%a,client=%h,txid=%x,qid=%Q '' | ''%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h '' | ''%m [%p] %q[user=%u,db=%d,app=%a] '': Choose from one of the available log formats.
    - `log_temp_files` integer: Log statements for each temporary file created larger than this number of kilobytes, -1 disables
    - `max_locks_per_transaction` integer: PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart.
    - `track_commit_timestamp` 'off' | 'on': Record commit time of transactions. Changing this parameter causes a service restart.
    - `track_functions` 'all' | 'pl' | 'none': Enables tracking of function call counts and time used.
    - `io_max_combine_limit` integer: EXPERIMENTAL: Controls the largest I/O size in operations that combine I/O in 8kB units, and silently limits the user-settable parameter io_combine_limit. Version 18 and up only. Changing this parameter causes a service restart.
    - `io_method` 'worker' | 'sync' | 'io_uring': EXPERIMENTAL: Controls the maximum number of I/O operations that one process can execute simultaneously. Version 18 and up only. Changing this parameter causes a service restart.
    - `max_stack_depth` integer: Maximum depth of the stack in bytes. The default is `2097152` (upstream default).
    - `max_parallel_workers` integer: Sets the maximum number of workers that the system can support for parallel queries. The default is `8` (upstream default).
    - `pg_partman_bgw.role` string: Controls which role to use for pg_partman's scheduled background tasks.
    - `max_logical_replication_workers` integer: PostgreSQL maximum logical replication workers (taken from the pool of max_parallel_workers). The default is `4` (upstream default). Changing this parameter causes a service restart.
    - `max_prepared_transactions` integer: PostgreSQL maximum prepared transactions. The default is `0`. Changing this parameter causes a service restart.
    - `max_worker_processes` integer: Sets the maximum number of background processes that the system can support. The default is `8`. Changing this parameter causes a service restart.
    - `pg_stat_statements.track` 'all' | 'top' | 'none': 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 is `top`.
    - `temp_file_limit` integer: PostgreSQL temporary file limit in KiB, -1 for unlimited
    - `log_error_verbosity` 'TERSE' | 'DEFAULT' | 'VERBOSE': Controls the amount of detail written in the server log for each message that is logged.
    - `log_min_duration_statement` integer: Log statements that take more than this number of milliseconds to run, -1 disables
    - `max_standby_streaming_delay` integer: Max standby streaming delay in milliseconds. The default is `30000` (upstream default).
    - `jit` boolean: Controls system-wide use of Just-in-Time Compilation (JIT).
    - `max_standby_archive_delay` integer: Max standby archive delay in milliseconds. The default is `30000` (upstream default).
    - `bg-writer` object
      - `bgwriter_delay` integer: Specifies the delay between activity rounds for the background writer in milliseconds. The default is `200`.
      - `bgwriter_flush_after` integer: 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. Setting of 0 disables forced writeback. The default is `512`.
      - `bgwriter_lru_maxpages` integer: In each round, no more than this many buffers will be written by the background writer. Setting this to zero disables background writing. The default is `100`.
      - `bgwriter_lru_multiplier` number: 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`.
  - `max-connections` integer: Maximum number of connections allowed to an instance
  - `users` object[]: List of service users
    - `type` string, required: Account type
    - `username` string, required: Account username
    - `password` string: Account password. A missing field indicates a user overridden password.
    - `allow-replication` boolean

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
