---
title: "Set-VBOPSQLDatabaseServerLimits"
description: "This cmdlet allows you to modify settings for the PostgreSQL instance. Use this cmdlet to extend hardware resources of the PostgreSQL instance where the Veeam Backup for Microsoft 365 configuration database is located."
canonical: "https://helpcenter.veeam.com/docs/vbo365/powershell/set-vbopsqldatabaseserverlimits.html"
breadcrumb: "PowerShell Reference > Veeam Backup for Microsoft 365 PowerShell Reference > Managing Veeam Backup for Microsoft 365 > Set-VBOPSQLDatabaseServerLimits"
dateModified: "2026-08-21"
---
# Set-VBOPSQLDatabaseServerLimits
## Short Description
Modifies settings of the PostgreSQL instance.
## Syntax
This cmdlet provides the following parameter sets:
## Detailed Description
This cmdlet allows you to modify settings for the PostgreSQL instance. Use this cmdlet to extend hardware resources of the PostgreSQL instance where the Veeam Backup for Microsoft 365 configuration database is located.
Depending on your configuration, you can use the following parameter sets:
- Automatic modification. Use this parameter set if you installed the PostgreSQL instance and the Veeam Backup for Microsoft 365 server on the same machine, and the PostgreSQL instance is used as the Veeam Backup for Microsoft 365 configuration database.
- Manual modification. Use this parameter set in the following cases:
- If the PostgreSQL instance is already installed on a remote machine and it is used by Veeam Backup for Microsoft 365 as the configuration database. In this case, you must specify the OS of the machine where the PostgreSQL database installed, number of CPU cores and amount of memory in GB.
- If the PostgreSQL instance is installed on a remote machine and currently is not used by Veeam Backup for Microsoft 365 as the configuration database. In this case, you must create a dump file with the necessary settings at the path you specified. Also, you must specify the OS of the machine where the PostgreSQL database installed, number of CPU cores, and amount of memory in GB.
To modify settings, you need to enter the necessary parameters with new values. The parameters that you omit will remain unchanged.
::: important
Consider the following:
- If you deploy a PostgreSQL instance along with the Veeam Backup for Microsoft 365 installation, the necessary resource capacity will be configured automatically during the installation.
- If the CPU or RAM resources are changed after Veeam Backup for Microsoft 365 installation, you must run this cmdlet again to adjust hardware resources of the PostgreSQL instance.
- You must restart the PostgreSQL service after you run this cmdlet.
- In larger environments to improve database connection efficiency and performance, it is recommended to use PgBouncer. For more information, see [this Veeam KB article](https://www.veeam.com/kb4758).
:::
## Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
CPUCount
|
Specifies a number of CPU cores that you want to assign to a machine where the PostgreSQL instance is installed.
|
Int32
|
True
|
Named
|
False
|
|
DumpToFile
|
Specifies a path to a dump file. The cmdlet will save a dump SQL file on a machine where you run the cmdlet.
|
String
|
False
|
Named
|
False
|
|
OSType
|
Specifies the OS of the machine where the PostgreSQL instance is installed:
|
String
|
True
|
Named
|
False
|
|
RamGb
|
Specifies amount of memory in GB that you want to assign to a machine where the PostgreSQL instance is installed.
|
Int32
|
True
|
Named
|
False
|
``
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Learn.
## Examples
::: example
### Example 1: Modifying Local PostgreSQL Instance
This command automatically modifies settings of the PostgreSQL instance. The PostgreSQL instance and the Veeam Backup for Microsoft 365 server are installed on the same machine, and the PostgreSQL instance is used as the Veeam Backup for Microsoft 365 configuration database.
```
Set-VBOPSQLDatabaseServerLimits
```
:::
::: example
### Example 2: Modifying Remote PostgreSQL Instance
This command manually modifies settings of the PostgreSQL instance. The PostgreSQL instance is already installed on a remote machine and it is used by Veeam Backup for Microsoft 365 as the configuration database.
```
Set-VBOPSQLDatabaseServerLimits -OSType Windows -CPUCount 8 -RamGb 32
```
:::
::: example
### Example 3a: Modifying Remote PostgreSQL Instance and Creating Dump File
This command creates a dump file with the necessary settings of the PostgreSQL instance, which you must then apply manually to the configuration database. The PostgreSQL instance is already installed on a remote machine and currently it is not used by Veeam Backup for Microsoft 365 as the configuration database.
```
Set-VBOPSQLDatabaseServerLimits -OSType Windows -CPUCount 8 -RamGb 32 -DumpToFile "c:\temp\PSqlLimitConfig.sql"
```
:::
::: example
### Example 3b: Dump File Example
The following is the example of a dump file that you must apply manually to the configuration database:
```
ALTER SYSTEM SET max_connections = '1000';
ALTER SYSTEM SET effective_cache_size = '';
ALTER SYSTEM SET checkpoint_completion_target = '0.9';
ALTER SYSTEM SET wal_buffers = '16MB';
ALTER SYSTEM SET default_statistics_target = '100';
ALTER SYSTEM SET random_page_cost = '1.1';
ALTER SYSTEM SET max_worker_processes = '';
ALTER SYSTEM SET max_parallel_workers_per_gather = '';
ALTER SYSTEM SET max_parallel_workers = '';
ALTER SYSTEM SET max_parallel_maintenance_workers = '';
ALTER SYSTEM SET min_wal_size = '2GB';
ALTER SYSTEM SET max_wal_size = '8GB';
ALTER SYSTEM SET hash_mem_multiplier = '2';
ALTER SYSTEM SET log_temp_files = '10MB';
ALTER SYSTEM SET log_lock_waits = 'on';
ALTER SYSTEM SET join_collapse_limit = '8';
ALTER SYSTEM SET geqo_threshold = '10';
ALTER SYSTEM SET log_line_prefix = '%m [%p] %q[user=%u,db=%d,app=%a] ';
ALTER SYSTEM SET jit = 'off';
ALTER SYSTEM SET log_autovacuum_min_duration = '60s';
ALTER SYSTEM SET log_min_duration_sample = '1000';
ALTER SYSTEM SET log_statement_sample_rate = '0.01';
ALTER SYSTEM SET log_rotation_age = '10d';
ALTER SYSTEM SET shared_buffers = '';
ALTER SYSTEM SET maintenance_work_mem = '';
ALTER SYSTEM SET work_mem = '';
```
:::