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

Overview
The overview page provides a single pane of glass to understand the details of your branch.
- Connect: Copy a connection string or individual parameters. Choose an endpoint type to route traffic to the primary, read replicas, or a connection pooler
- Health: View the health and state of your primary instance and replicas
- Instance Details: Understand the instance health, hierarchy and metadata
- Create Child: Create a child branch using the current branch as the source
- Instance Health: Click into an instance node to quickly view the latest metrics
- Rotate Credentials: Rotate the database password for the
xatauser for enhanced security

Branch Features
Queries
Execute and manage database queries across your branches.
Metrics
Monitor branch performance and usage across your instances within a branch.
Extensions
Extend your database functionality with extensions.
Schemas
Manage your database structure and schema.
Migrations
Apply schema changes to your database without downtime.
Settings
Configure branch-specific settings including instance details, compute and PostgreSQL parameters.Instance Details
Configure the fundamental properties and settings for your branch instance.
- Branch Name: Set and modify the human-readable branch name
- Replicas: Configure the amount of replicas for a branch
- Instance Type: Configure the instance type for this branch
- Storage: Adjust storage size for the branch in GB. Storage can only be increased, not decreased, with a maximum of 1024 Gi (1 TB). You are charged based on actual usage, not the configured limit. Note that 0.5-1% of the configured limit is reserved for filesystem overhead.
- PostgreSQL Image: Select from available PostgreSQL images including standard postgres, and analytics-optimized. You can upgrade to newer minor versions (e.g., from 17.5 to 17.7) but cannot change the offering type or perform major version upgrades.
Compute
Configure scale-to-zero settings for cost optimization. Learn more about compute settings →Rotate Password
Generate a new password for the PostgreSQLxata user on this branch. Existing connections keep working, but new connections must use the new password.
You can rotate the password from the branch settings page or using the CLI:
- Existing database connections remain active during rotation
- New connections will use the new password once rotation completes
- PgBouncer automatically picks up the new password for connection pooling
- There may be a brief period where credentials are unavailable during rotation
PostgreSQL Configuration
Fine-tune PostgreSQL parameters and settings for optimal database performance.
- Connections: Configure connection and authentication settings
- Resource Consumption: Configure memory and resource allotation settings
- Planner: Configure query planner options
- IO & Async Behaviour: Configure input/output and asynchronous behavior
- Write-Ahead Log: Configure Write-Ahead logging (WAL)
- Extensions: Configure extension-specific parameters (available parameters depend on your branch’s image type and PostgreSQL version)
Available PostgreSQL parameters and preload libraries depend on your branch’s image type (postgres or analytics) and PostgreSQL major version. Extension-specific parameters only appear when the extension is available for your image type.
Connection Pooling
Xata uses PgBouncer for connection pooling to efficiently manage database connections. The connection pooler is automatically configured based on your instance size and PostgreSQL settings.Default Pool Size
Thedefault_pool_size parameter controls how many server connections PgBouncer maintains per database. This value is automatically calculated as floor(0.9 * max_connections) based on your instance’s max_connections setting.
| Instance | RAM | max_connections | default_pool_size |
|---|---|---|---|
| xata.micro | 1 GB | 50 | 45 |
| xata.small | 2 GB | 100 | 90 |
| xata.medium | 4 GB | 200 | 180 |
| xata.large | 8 GB | 400 | 360 |
| xata.xlarge | 16 GB | 800 | 720 |
| xata.2xlarge | 32 GB | 1,600 | 1,440 |
| xata.4xlarge | 64 GB | 3,200 | 2,880 |
| xata.8xlarge | 128 GB | 5,000 | 4,500 |
max_connections in your PostgreSQL configuration, the default_pool_size will automatically adjust on the next reconciliation. You can also override this value directly in your branch configuration if needed.
Additional Pooler Settings
Xata configures the following PgBouncer parameters for optimal performance:- max_prepared_statements: 1000 - Maximum number of prepared statements to cache
- query_wait_timeout: 120 seconds - Maximum time queries can wait for a connection
Preloaded Libraries
Configure extensions and libraries to be preloaded with your branch. Extensions that require preloading must be added to this list before their configuration parameters become available in the PostgreSQL Configuration section. When you add an extension to the preload list, its parameters will become visible and configurable. If you remove an extension from the preload list, any configured parameters for that extension will be automatically removed from your branch configuration.Endpoint Types
When building a connection string, you can select how traffic is routed to your branch. The endpoint type is encoded into the connection string’s hostname, so a single branch can expose multiple endpoints simultaneously.- Primary only (
rw): Full read and write access to the primary instance. This is the default. - Primary or Read Replica (
r): Routed access to the primary or a replica. Provides zero downtime during switchovers. - Read Replica only (
ro): Read-only access guaranteed to use read replicas, keeping load off the primary. Requires at least one replica configured on the branch. - Pooler (
pooled_rw): Pooled access to the primary through a connection pooler. Recommended for serverless and high-concurrency workloads where many short-lived connections open and close frequently.
xata branch url CLI reference for all available connection types.
Upgrading PostgreSQL Versions
You can upgrade your branch to a newer minor version of PostgreSQL while maintaining the same major version and offering type. This allows you to benefit from bug fixes and performance improvements in newer PostgreSQL releases.Upgrade Requirements
- Minor versions only: You can upgrade from one minor version to another within the same major version (e.g., 17.5 → 17.7)
- Same offering: The PostgreSQL offering type (postgres or analytics) must remain the same
- No downgrades: You cannot downgrade to an older minor version
- No major version changes: Major version upgrades (e.g., 16.x → 17.x) are not supported through this method
- Separate from configuration changes: Image upgrades cannot be combined with PostgreSQL configuration parameters, instance type, or preload library changes in the same update. Make these changes in separate requests.
In the Console
Navigate to your branch’s Settings page. Under Instance Details, the Postgres image field shows your current PostgreSQL version and lists only compatible minor version upgrades. Select the target version and save your changes.Using the CLI
Use thexata branch set postgres-version command to upgrade. In interactive mode, it presents a list of compatible versions:
<offering>:<version> format (e.g., postgres:17.7). If the specified version is not a valid upgrade for the current image, the CLI will return an error.
Using the API
Rotating database credentials
You can rotate the database password for thexata user to enhance security. This operation is asynchronous and typically completes within a few seconds.
Using the API
- Existing database connections remain active during rotation
- New connections will use the new password once rotation completes
- PgBouncer automatically picks up the new password for connection pooling
- There may be a brief period where credentials are unavailable during rotation
Deleting branches
Branches can be deleted from the console, the CLI, or the API. Deletion permanently removes the branch and its data, and cannot be undone.Using the API
204 No Content.
Using the CLI
xata branch delete CLI reference for all options.