# FAQ

The following are a few FAQ to provide insight into the PostgreSQL product.

## Provisioning and configuration

### On what server instances is PostgreSQL offered?

DBaaS offers PostgreSQL on virtual servers. Cloud Cubes support may be introduced in the future.

### Which replication modes are supported for PostgreSQL clusters?

PostgreSQL supports only `ASYNCHRONOUS` and `STRICTLY_SYNCHRONOUS` replication modes. Existing clusters using `SYNCHRONOUS` mode can switch to one of these supported replication modes using the [<mark style="color:blue;">API</mark>](https://docs.ionos.com/cloud/databases/postgresql/api/v1-api/modify-cluster-attributes/update-postgresql-replication-mode).

## Connection pooling

### Is there a connection pooling option for PostgreSQL?

IONOS Cloud DBaaS does not provide connection pooling. However, you may use a connection pooler (such as `pgbouncer`) between your application and the database.

To use DBaaS managed `pgbouncer`, see [<mark style="color:blue;">Activate a PostgreSQL Connection Pooler</mark>](https://docs.ionos.com/cloud/databases/postgresql/api/v1-api/modify-cluster-attributes/activate-a-postgresql-connection-pooler).

### After the connection limit has been reached, will there be an error?

Depending on the library you are using, you get the following error:

`Failed to create DB connection: addr x.x.x.x:5432: connection refused.`

### How do we prevent reaching the connection limit?

The best way to manage connections is to have your application maintain a pool of at least 10-20 connections. It is not considered good practice to have many DB connections. However, letting the user configure `max_connections` themselves in the future is an option.

### Can I scale the deployment to increase its connection limit?

Yes. For more information, see [<mark style="color:blue;">Connection Limits</mark>](https://docs.ionos.com/cloud/databases/postgresql/overview/limitations).

## Backup and recovery

### What are the supported backup methods?

We provide automated backups in IONOS Cloud. If you want to use other backup options, you may use a client-side tool, such as [<mark style="color:blue;">pg\_dump</mark>](https://www.postgresql.org/docs/current/app-pgdump.html).

### Why cannot I restore to the time I specified?

If you are receiving an error message, `Parameter out of bounds: The recovery target time is before the newest basebackup.`, check the `earliestRecoveryTargetTime` of your backup. Your target time for the restore needs to be after this timestamp. You can use an earlier backup with `earliestRecoveryTargetTime` for your cluster if you have one.

If the `earliestRecoveryTargetTime` is missing in your backup, the cluster from where you want to restore wasn't able to do a base backup. It can happen when you quickly delete a newly created cluster, since the base backup will be triggered up to a minute after the cluster is available.

## Performance and scaling

### What are the main considerations for latency and performance?

The number of standby nodes (in addition to the primary node) doesn't really matter. If you have one or ten, it makes no difference. Synchronous modes are slower in write performance due to increased communication latency between a primary and a standby node.

## Monitoring

### Which metrics are available for PostgreSQL?

Cluster metrics include connections count, CPU usage, disk Input/Output (I/O) time, instance count, memory usage, memory availability, Linux load average, disk space, index scans, and sequential scans. For more information, see [<mark style="color:blue;">Metrics Overview</mark>](https://docs.ionos.com/cloud/databases/api/v1-api/metrics#metrics-overview). You can view the detailed performance metrics using the [<mark style="color:blue;">Telemetry API</mark>](https://docs.ionos.com/cloud/observability/logging-service/api-how-tos/telemetry-api).

## PostgreSQL v2 API

### What is the PostgreSQL v2 API?

The PostgreSQL v2 API is a modernized, future-proof, and developer-friendly `REST` interface designed to provision and manage highly available PostgreSQL clusters. It introduces refined resource modeling, region-specific routing, and OpenAPI best-practice error handling. For more information, see [<mark style="color:blue;">Features</mark>](https://docs.ionos.com/cloud/databases/api/v2-api#features).

### What authentication methods are supported in PostgreSQL v2 API?

To align with modern security best practices, the v2 API requires API tokens (`tokenAuth`). Legacy basic authentication (`basicAuth`), which is available in PostgreSQL v1, is no longer supported.

### What endpoints do I use to connect to the PostgreSQL v2 API?

The PostgreSQL v2 API utilizes multiple region-specific endpoints. You must direct your requests to the specific region where your database is deployed. For information on supported regions and their corresponding endpoints, see [<mark style="color:blue;">Endpoints</mark>](https://docs.ionos.com/cloud/databases/api/v2-api#endpoints).

### Can I connect to the default `postgres` database in the PostgreSQL v2 API?

No, you cannot. The v2 API intentionally denies this access. If you attempt to connect to it using your v2 cluster credentials, you receive a "FATAL: permission denied for database `postgres` error". You must instead connect to the specific database you defined within your cluster configuration during provisioning.

### What is the "Ensure" pattern in PostgreSQL v2 API?

The PostgreSQL v2 API introduces the "Ensure" pattern for cluster management. By utilizing `PUT` semantics such as `PUT /clusters/{clusterId}`, you can safely and idempotently create a new cluster or update an existing one to match your desired state. Non-present data will be filled with defaults.

### How do I manage users and databases in PostgreSQL v2 API?

You define your main user credentials, including the `username`, `password`, and `database` name, directly within the credentials property of your cluster payload during provisioning or when modifying the cluster.

### How are backups and backup locations managed in PostgreSQL v2 API?

Backups have been elevated to a dedicated top-level `/backups` endpoint, rather than being strictly nested under individual clusters. Additionally, the API introduces `BackupLocations` (`/backup-locations`) as an explicit resource, allowing you to query and configure the geographic safety of your backups.

### Does the PostgreSQL v2 API support filtering and pagination?

Yes. Every listing endpoint in the v2 API, such as `/clusters` or `/backups` supports standardized pagination (using `limit` and `offset`) and robust filtering. It allows you to search your resources by attributes such as `filter.state`, `filter.name`, or `filter.clusterId`.

### Can I view cluster logs using the PostgreSQL v2 API?

No, the explicit `/logs` endpoint available in v1 has been removed in the PostgreSQL v2 specification, indicating a shift in how operational observability and log access are managed.
