PostgreSQL

To provide stable operation of a PostgreSQL server, make sure that you have enough disk space and compute resources allocated to the server and the following recommended settings configured.

General Recommendations

  • It is highly recommended that you install PostgreSQL on a dedicated server.
  • It is recommended that you back up PostgreSQL databases on a regular basis. You can use Veeam Backup & Replication for this purpose.

Disk Size Calculation

When calculating the disk space required for the PostgreSQL server, take into account your desired data set, daily change rate and the retention policy settings. The initial backup of Salesforce data requires at least x1.6 more disk space in PostgreSQL since the product creates both the latest and history records. All further backups are incremental and consume the same amount of disk space as original records occupy in Salesforce.

You can use the following formula to calculate the required disk space: (Salesforce Used Data Space * 1.6) + (Size of Added Data * Planned Period of Data Backup) + (Size of Changed Data * Number of Backups Within Your Retention Period).

Tip

To check the amount of space currently occupied by your data in Salesforce, open the Salesforce UI and navigate to Setup > Company Information.

Consider the following example:

  • Salesforce Used Data Space — your Salesforce database initially stores 200 GB of data.
  • Size of Added Data — 10,000 records of 2 KB each are added to the Salesforce database daily (that is, 10,000 * 2 KB / 1024 = 0.02 GB).
  • Planned Period of Data Backup — data is planned to be backed up daily for a period of 5 years (that is, 5 *365 days = 1825 days).
  • Size of Changed Data — 10,000 records of 2 KB each are changed in the Salesforce database each backup cycle (that is, 10,000 * 2 KB / 1024 = 0.02 GB).
  • Number of Backups Within Your Retention Period — backup is performed every hour (that is, 24 backups per day) while the retention period is set to 180 days.

In this case, the amount of the disk space required for the PostgreSQL server will be calculated as follows: (200 GB * 1.6) + (0.02 GB * 1825) + (0.02 GB * 24 * 180) = 320 GB + 36.5 GB + 86.4 GB = 443 GB.

PostgreSQL Configuration Settings

Consider adjusting the default settings in the postgresql.conf configuration file as follows:

Parameter

Value

max_connections

300 or more*

superuser_reserved_connections

7

shared_buffers

20% of RAM

random_page_cost

1.1

work_mem

15% of RAM

maintenance_work_mem

128 MB

max_wal_size

3 GB

min_wal_size

2 GB

checkpoint_completion_target

0.9

effective_io_concurrency

200

effective_cache_size

60% of RAM

*Veeam Backup for Salesforce requires about 20 connections to one PostgreSQL database for management operations, about 50 connections per one backup policy and 10 connections per one custom backup schedule. To avoid performance issues, it is recommended that you set the maximum allowed number of connections to 300 in the PostgeSQL database configuration. You may need to adjust this number later based on the number of created backup policies and schedules.

Page updated 10/10/2024

Page content applies to build 3.1.0.2378