Skip to main content

Advanced parameters for Aiven for PostgreSQL®

On creating a PostgreSQL® database, you can customize it using a series of the following advanced parameters:

Parameter

Additional Cloud Regions for Backup Replication

migration

object,null

Migrate data from existing server

Hostname or IP address of the server where to migrate data from

  • min: 1
  • max: 65535

Port number of the server where to migrate data from

Password for authentication with the server where to migrate data from

  • default: true

The server where to migrate data from is secured with SSL

User name for authentication with the server where to migrate data from

Database name for bootstrapping the initial connection

Comma-separated list of databases, which should be ignored during migration (supported by MySQL and PostgreSQL only at the moment)

Comma-separated list of database roles, which should be ignored during migration (supported by PostgreSQL only at the moment)

The migration method to be used (currently supported only by Redis, Dragonfly, MySQL and PostgreSQL service types)

  • default: 0.0.0.0/0,::/0

IP filter

Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'

static_ips

boolean

Static IP addresses

Use static public IP addresses

service_log

boolean,null

Service logging

Store logs for the service so that they are available in the HTTP API and console.

Enable IPv6

Register AAAA DNS records for the service, and allow IPv6 packets to service ports

admin_username

string,null

Custom username for admin user. This must be set only when a new service is being created.

admin_password

string,null

Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.

backup_hour

integer,null

  • max: 23

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,null

  • max: 59

The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.

pgaudit

object

PGAudit settings

System-wide settings for the pgaudit extension

Enable pgaudit extension.

Enable pgaudit extension. When enabled, pgaudit extension will be automatically installed.Otherwise, extension will be uninstalled but auditing configurations will be preserved.

Specifies which classes of statements will be logged by session audit logging.

  • default: true

Specifies that session logging should be enabled in the casewhere all relations in a statement are in pg_catalog.

Specifies whether log messages will be visible to a client process such as psql.

  • default: log

Specifies the log level that will be used for log entries.

  • min: -1
  • max: 102400
  • default: -1

Crop parameters representation and whole statements if they exceed this threshold. A (default) value of -1 disable the truncation.

  • default: true

This GUC allows to turn off logging nested statements, that is, statements that are executed as part of another ExecutorRun.

Specifies that audit logging should include the parameters that were passed with the statement.

Specifies that parameter values longer than this setting (in bytes) should not be logged, but replaced with <long param suppressed>.

Specifies whether session audit logging should create a separate log entry for each relation (TABLE, VIEW, etc.) referenced in a SELECT or DML statement.

Specifies that audit logging should include the rows retrieved or affected by a statement. When enabled the rows field will be included after the parameter field.

  • default: true

Specifies whether logging will include the statement text and parameters (if enabled).

Specifies whether logging will include the statement text and parameters with the first log entry for a statement/substatement combination or with every entry.

Specifies the master role to use for object audit logging.

pglookout

object

  • default: [object Object]

PGLookout settings

System-wide settings for pglookout.

  • min: 10
  • max: 9223372036854776000
  • default: 60

max_failover_replication_time_lag

Number of seconds of master unavailability before triggering database failover to standby

Name of the PG Service from which to fork (deprecated, use service_to_fork_from). This has effect only when a new service is being created.

Name of another service to fork from. This has effect only when a new service is being created.

Name of another project to fork a service from. This has effect only when a new service is being created.

Synchronous replication type. Note that the service plan also needs to support synchronous replication.

pg_read_replica

boolean,null

Should the service which is being forked be a read replica (deprecated, use read_replica service integration instead).

This setting is deprecated. Use read_replica service integration instead.

  • Service restart

Enable pg_stat_monitor extension if available for the current cluster

Enable the pg_stat_monitor extension. Changing this parameter causes a service restart. When this extension is enabled, pg_stat_statements results for utility commands are unreliable

pg_version

string,null

PostgreSQL major version

pgbouncer

object

PGBouncer connection pooling settings

System-wide settings for pgbouncer.

Run server_reset_query (DISCARD ALL) in all pooling modes

List of parameters to ignore when given in startup packet

  • max: 10000

Add more server connections to pool if below this number. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size.

  • min: 60
  • max: 86400
  • default: 3600

The pooler will close an unused server connection that has been connected longer than this. [seconds]

  • max: 86400
  • default: 600

If a server connection has been idle more than this many seconds it will be dropped. If 0 then timeout is disabled. [seconds]

  • max: 10000

If non-zero then create automatically a pool of that size per user when a pool doesn't exist.

  • default: transaction

PGBouncer pool mode

  • max: 2147483647

Do not allow more than this many server connections per database (regardless of user). Setting it to 0 means unlimited.

  • max: 86400
  • default: 3600

If the automatically created database pools have been unused this many seconds, they are freed. If 0 then timeout is disabled. [seconds]

  • max: 3000
  • default: 100

PgBouncer tracks protocol-level named prepared statements related commands sent by the client in transaction and statement pooling modes when max_prepared_statements is set to a non-zero value. Setting it to 0 disables prepared statements. max_prepared_statements defaults to 100, and its maximum is 3000.

Recovery target time when forking a service. This has effect only when a new service is being created.

variant

string,null

Variant of the PostgreSQL service, may affect the features that are exposed by default

Allow access to selected service ports from private networks

Allow clients to connect to pg with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations

Allow clients to connect to pgbouncer with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations

Allow clients to connect to prometheus with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations

Allow access to selected service components through Privatelink

Enable pg

Enable pgbouncer

Enable prometheus

Allow access to selected service ports from the public Internet

Allow clients to connect to pg from the public internet for service nodes that are in a project VPC or another type of private network

Allow clients to connect to pgbouncer from the public internet for service nodes that are in a project VPC or another type of private network

Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network

pg

object

postgresql.conf configuration values

  • min: 200000000
  • max: 1500000000
  • Service restart

autovacuum_freeze_max_age

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.

  • min: 1
  • max: 20
  • Service restart

autovacuum_max_workers

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.

  • min: 1
  • max: 86400

autovacuum_naptime

Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds. The default is 60.

  • max: 2147483647

autovacuum_vacuum_threshold

Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50.

  • max: 2147483647

autovacuum_analyze_threshold

Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50.

  • max: 1

autovacuum_vacuum_scale_factor

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.

  • max: 1

autovacuum_analyze_scale_factor

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.

  • min: -1
  • max: 100

autovacuum_vacuum_cost_delay

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).

  • min: -1
  • max: 10000

autovacuum_vacuum_cost_limit

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).

  • min: 10
  • max: 10000

bgwriter_delay

Specifies the delay between activity rounds for the background writer in milliseconds. The default is 200.

  • max: 2048

bgwriter_flush_after

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.

  • max: 1073741823

bgwriter_lru_maxpages

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.

  • max: 10

bgwriter_lru_multiplier

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.

  • min: 500
  • max: 1800000

deadlock_timeout

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).

  • default: md5

password_encryption

Chooses the algorithm for encrypting passwords.

default_toast_compression

Specifies the default TOAST compression method for values of compressible columns. The default is lz4. Only available for PostgreSQL 14+.

  • max: 604800000

idle_in_transaction_session_timeout

Time out sessions with open transactions after this number of milliseconds

pg.jit

boolean

jit

Controls system-wide use of Just-in-Time Compilation (JIT).

  • min: -1
  • max: 2147483647

log_autovacuum_min_duration

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.

log_error_verbosity

Controls the amount of detail written in the server log for each message that is logged.

log_line_prefix

Choose from one of the available log formats.

  • min: -1
  • max: 86400000

log_min_duration_statement

Log statements that take more than this number of milliseconds to run, -1 disables

  • min: -1
  • max: 2147483647

log_temp_files

Log statements for each temporary file created larger than this number of kilobytes, -1 disables

  • min: 1000
  • max: 4096
  • Service restart

max_files_per_process

PostgreSQL maximum number of files that can be open per process. The default is 1000 (upstream default). Changing this parameter causes a service restart.

  • max: 10000
  • Service restart

max_prepared_transactions

PostgreSQL maximum prepared transactions. The default is 0. Changing this parameter causes a service restart.

  • min: 64
  • max: 5120
  • Service restart

max_pred_locks_per_transaction

PostgreSQL maximum predicate locks per transaction. The default is 64 (upstream default). Changing this parameter causes a service restart.

  • min: 64
  • max: 6400
  • Service restart

max_locks_per_transaction

PostgreSQL maximum locks per transaction. Changing this parameter causes a service restart.

  • min: -1
  • max: 2147483647

max_slot_wal_keep_size

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.

  • min: 2097152
  • max: 6291456

max_stack_depth

Maximum depth of the stack in bytes. The default is 2097152 (upstream default).

  • min: 1
  • max: 43200000

max_standby_archive_delay

Max standby archive delay in milliseconds. The default is 30000 (upstream default).

  • min: 1
  • max: 43200000

max_standby_streaming_delay

Max standby streaming delay in milliseconds. The default is 30000 (upstream default).

  • min: 8
  • max: 64
  • Service restart

max_replication_slots

PostgreSQL maximum replication slots. The default is 20. Changing this parameter causes a service restart.

  • min: 4
  • max: 64
  • Service restart

max_logical_replication_workers

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: 96

max_parallel_workers

Sets the maximum number of workers that the system can support for parallel queries. The default is 8 (upstream default).

  • max: 96

max_parallel_workers_per_gather

Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. The default is 2 (upstream default).

  • min: 8
  • max: 96
  • Service restart

max_worker_processes

Sets the maximum number of background processes that the system can support. The default is 8. Changing this parameter causes a service restart.

pg_partman_bgw.role

Controls which role to use for pg_partman's scheduled background tasks.

  • min: 3600
  • max: 604800

pg_partman_bgw.interval

Sets the time interval in seconds to run pg_partman's scheduled tasks. The default is 3600.

  • min: 1
  • max: 10
  • Service restart

pg_stat_monitor.pgsm_max_buckets

Sets the maximum number of buckets. Changing this parameter causes a service restart. Only available for PostgreSQL 13+.

  • Service restart

pg_stat_monitor.pgsm_enable_query_plan

Enables or disables query plan monitoring. Changing this parameter causes a service restart. Only available for PostgreSQL 13+.

pg_stat_statements.track

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.

  • min: -1
  • max: 2147483647

temp_file_limit

PostgreSQL temporary file limit in KiB, -1 for unlimited

timezone

PostgreSQL service timezone

  • min: 1024
  • max: 10240
  • Service restart

track_activity_query_size

Specifies the number of bytes reserved to track the currently executing command for each active session. Changing this parameter causes a service restart.

  • Service restart

track_commit_timestamp

Record commit time of transactions. Changing this parameter causes a service restart.

track_functions

Enables tracking of function call counts and time used.

track_io_timing

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.

  • min: 20
  • max: 64
  • Service restart

max_wal_senders

PostgreSQL maximum WAL senders. The default is 20. Changing this parameter causes a service restart.

wal_sender_timeout

Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout.

  • min: 10
  • max: 200

wal_writer_delay

WAL flush interval in milliseconds. The default is 200. Setting this parameter to a lower value may negatively impact performance.

  • min: 20
  • max: 60
  • Service restart

shared_buffers_percentage

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. Changing this parameter causes a service restart.

TimescaleDB extension configuration values

System-wide settings for the timescaledb extension

  • min: 1
  • max: 4096
  • default: 16
  • Service restart

timescaledb.max_background_workers

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.

work_mem

integer

  • min: 1
  • max: 1024

work_mem

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. The default is 1MB + 0.075% of total RAM (up to 32MB).