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

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

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.

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.

Enable pg_stat_monitor extension if available for the current cluster

Enable the pg_stat_monitor extension. Enabling this extension will cause the cluster to be restarted.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

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. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. This parameter will cause the server to be restarted.

  • min: 1
  • max: 20

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 three. This parameter can only be set at server start.

  • min: 1
  • max: 86400

autovacuum_naptime

Specifies the minimum delay between autovacuum runs on any given database. The delay is measured in seconds, and the default is one minute

  • 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 tuples

  • 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 tuples.

  • 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. The default is 0.2 (20% of table size)

  • 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. The default is 0.2 (20% of table size)

  • 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 value is 20 milliseconds

  • 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 (which is the default), the regular vacuum_cost_limit value will be used.

  • min: 10
  • max: 10000

bgwriter_delay

Specifies the delay between activity rounds for the background writer in milliseconds. 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, default is 512. Setting of 0 disables forced writeback.

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

default_toast_compression

Specifies the default TOAST compression method for values of compressible columns (the default is lz4).

  • 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 (the default) disables logging autovacuum actions.

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

max_files_per_process

PostgreSQL maximum number of files that can be open per process

  • max: 10000

max_prepared_transactions

PostgreSQL maximum prepared transactions

  • min: 64
  • max: 5120

max_pred_locks_per_transaction

PostgreSQL maximum predicate locks per transaction

  • min: 64
  • max: 6400

max_locks_per_transaction

PostgreSQL maximum locks per transaction

  • min: -1
  • max: 2147483647

max_slot_wal_keep_size

PostgreSQL maximum WAL size (MB) reserved for replication slots. Default is -1 (unlimited). 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

  • min: 1
  • max: 43200000

max_standby_archive_delay

Max standby archive delay in milliseconds

  • min: 1
  • max: 43200000

max_standby_streaming_delay

Max standby streaming delay in milliseconds

  • min: 8
  • max: 64

max_replication_slots

PostgreSQL maximum replication slots

  • min: 4
  • max: 64

max_logical_replication_workers

PostgreSQL maximum logical replication workers (taken from the pool of max_parallel_workers)

  • max: 96

max_parallel_workers

Sets the maximum number of workers that the system can support for parallel queries

  • 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

  • min: 8
  • max: 96

max_worker_processes

Sets the maximum number of background processes that the system can support

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 to run pg_partman's scheduled tasks

  • min: 1
  • max: 10

pg_stat_monitor.pgsm_max_buckets

Sets the maximum number of buckets

pg_stat_monitor.pgsm_enable_query_plan

Enables or disables query plan monitoring

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 value 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

track_activity_query_size

Specifies the number of bytes reserved to track the currently executing command for each active session.

track_commit_timestamp

Record commit time of transactions.

track_functions

Enables tracking of function call counts and time used.

track_io_timing

Enables timing of database I/O calls. This parameter is off by default, because it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms.

  • min: 20
  • max: 64

max_wal_senders

PostgreSQL maximum WAL senders

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. Note that setting this value to lower than the default 200ms may negatively impact performance

  • min: 20
  • max: 60

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.

TimescaleDB extension configuration values

System-wide settings for the timescaledb extension

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

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.

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