DatabasePostgresqlConfigArgs

data class DatabasePostgresqlConfigArgs(val autovacuumAnalyzeScaleFactor: Output<Double>? = null, val autovacuumAnalyzeThreshold: Output<Int>? = null, val autovacuumFreezeMaxAge: Output<Int>? = null, val autovacuumMaxWorkers: Output<Int>? = null, val autovacuumNaptime: Output<Int>? = null, val autovacuumVacuumCostDelay: Output<Int>? = null, val autovacuumVacuumCostLimit: Output<Int>? = null, val autovacuumVacuumScaleFactor: Output<Double>? = null, val autovacuumVacuumThreshold: Output<Int>? = null, val backupHour: Output<Int>? = null, val backupMinute: Output<Int>? = null, val bgwriterDelay: Output<Int>? = null, val bgwriterFlushAfter: Output<Int>? = null, val bgwriterLruMaxpages: Output<Int>? = null, val bgwriterLruMultiplier: Output<Double>? = null, val clusterId: Output<String>? = null, val deadlockTimeout: Output<Int>? = null, val defaultToastCompression: Output<String>? = null, val idleInTransactionSessionTimeout: Output<Int>? = null, val jit: Output<Boolean>? = null, val logAutovacuumMinDuration: Output<Int>? = null, val logErrorVerbosity: Output<String>? = null, val logLinePrefix: Output<String>? = null, val logMinDurationStatement: Output<Int>? = null, val maxFilesPerProcess: Output<Int>? = null, val maxLocksPerTransaction: Output<Int>? = null, val maxLogicalReplicationWorkers: Output<Int>? = null, val maxParallelWorkers: Output<Int>? = null, val maxParallelWorkersPerGather: Output<Int>? = null, val maxPredLocksPerTransaction: Output<Int>? = null, val maxPreparedTransactions: Output<Int>? = null, val maxReplicationSlots: Output<Int>? = null, val maxStackDepth: Output<Int>? = null, val maxStandbyArchiveDelay: Output<Int>? = null, val maxStandbyStreamingDelay: Output<Int>? = null, val maxWalSenders: Output<Int>? = null, val maxWorkerProcesses: Output<Int>? = null, val pgPartmanBgwInterval: Output<Int>? = null, val pgPartmanBgwRole: Output<String>? = null, val pgStatStatementsTrack: Output<String>? = null, val pgbouncers: Output<List<DatabasePostgresqlConfigPgbouncerArgs>>? = null, val sharedBuffersPercentage: Output<Double>? = null, val tempFileLimit: Output<Int>? = null, val timescaledbs: Output<List<DatabasePostgresqlConfigTimescaledbArgs>>? = null, val timezone: Output<String>? = null, val trackActivityQuerySize: Output<Int>? = null, val trackCommitTimestamp: Output<String>? = null, val trackFunctions: Output<String>? = null, val trackIoTiming: Output<String>? = null, val walSenderTimeout: Output<Int>? = null, val walWriterDelay: Output<Int>? = null, val workMem: Output<Int>? = null) : ConvertibleToJava<DatabasePostgresqlConfigArgs>

Provides a virtual resource that can be used to change advanced configuration options for a DigitalOcean managed PostgreSQL database cluster.

Note PostgreSQL configurations are only removed from state when destroyed. The remote configuration is not unset.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const exampleDatabaseCluster = new digitalocean.DatabaseCluster("example", {
name: "example-postgresql-cluster",
engine: "pg",
version: "15",
size: digitalocean.DatabaseSlug.DB_1VPCU1GB,
region: digitalocean.Region.NYC1,
nodeCount: 1,
});
const example = new digitalocean.DatabasePostgresqlConfig("example", {
clusterId: exampleDatabaseCluster.id,
timezone: "UTC",
workMem: 16,
});
import pulumi
import pulumi_digitalocean as digitalocean
example_database_cluster = digitalocean.DatabaseCluster("example",
name="example-postgresql-cluster",
engine="pg",
version="15",
size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
region=digitalocean.Region.NYC1,
node_count=1)
example = digitalocean.DatabasePostgresqlConfig("example",
cluster_id=example_database_cluster.id,
timezone="UTC",
work_mem=16)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var exampleDatabaseCluster = new DigitalOcean.DatabaseCluster("example", new()
{
Name = "example-postgresql-cluster",
Engine = "pg",
Version = "15",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
Region = DigitalOcean.Region.NYC1,
NodeCount = 1,
});
var example = new DigitalOcean.DatabasePostgresqlConfig("example", new()
{
ClusterId = exampleDatabaseCluster.Id,
Timezone = "UTC",
WorkMem = 16,
});
});
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleDatabaseCluster, err := digitalocean.NewDatabaseCluster(ctx, "example", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("example-postgresql-cluster"),
Engine: pulumi.String("pg"),
Version: pulumi.String("15"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
Region: pulumi.String(digitalocean.RegionNYC1),
NodeCount: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = digitalocean.NewDatabasePostgresqlConfig(ctx, "example", &digitalocean.DatabasePostgresqlConfigArgs{
ClusterId: exampleDatabaseCluster.ID(),
Timezone: pulumi.String("UTC"),
WorkMem: pulumi.Int(16),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.DatabaseCluster;
import com.pulumi.digitalocean.DatabaseClusterArgs;
import com.pulumi.digitalocean.DatabasePostgresqlConfig;
import com.pulumi.digitalocean.DatabasePostgresqlConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleDatabaseCluster = new DatabaseCluster("exampleDatabaseCluster", DatabaseClusterArgs.builder()
.name("example-postgresql-cluster")
.engine("pg")
.version("15")
.size("db-s-1vcpu-1gb")
.region("nyc1")
.nodeCount(1)
.build());
var example = new DatabasePostgresqlConfig("example", DatabasePostgresqlConfigArgs.builder()
.clusterId(exampleDatabaseCluster.id())
.timezone("UTC")
.workMem(16)
.build());
}
}
resources:
example:
type: digitalocean:DatabasePostgresqlConfig
properties:
clusterId: ${exampleDatabaseCluster.id}
timezone: UTC
workMem: 16
exampleDatabaseCluster:
type: digitalocean:DatabaseCluster
name: example
properties:
name: example-postgresql-cluster
engine: pg
version: '15'
size: db-s-1vcpu-1gb
region: nyc1
nodeCount: 1

Import

A PostgreSQL database cluster's configuration can be imported using the id the parent cluster, e.g. bash

$ pulumi import digitalocean:index/databasePostgresqlConfig:DatabasePostgresqlConfig example 52556c07-788e-4d41-b8a7-c796432197d1

Constructors

Link copied to clipboard
constructor(autovacuumAnalyzeScaleFactor: Output<Double>? = null, autovacuumAnalyzeThreshold: Output<Int>? = null, autovacuumFreezeMaxAge: Output<Int>? = null, autovacuumMaxWorkers: Output<Int>? = null, autovacuumNaptime: Output<Int>? = null, autovacuumVacuumCostDelay: Output<Int>? = null, autovacuumVacuumCostLimit: Output<Int>? = null, autovacuumVacuumScaleFactor: Output<Double>? = null, autovacuumVacuumThreshold: Output<Int>? = null, backupHour: Output<Int>? = null, backupMinute: Output<Int>? = null, bgwriterDelay: Output<Int>? = null, bgwriterFlushAfter: Output<Int>? = null, bgwriterLruMaxpages: Output<Int>? = null, bgwriterLruMultiplier: Output<Double>? = null, clusterId: Output<String>? = null, deadlockTimeout: Output<Int>? = null, defaultToastCompression: Output<String>? = null, idleInTransactionSessionTimeout: Output<Int>? = null, jit: Output<Boolean>? = null, logAutovacuumMinDuration: Output<Int>? = null, logErrorVerbosity: Output<String>? = null, logLinePrefix: Output<String>? = null, logMinDurationStatement: Output<Int>? = null, maxFilesPerProcess: Output<Int>? = null, maxLocksPerTransaction: Output<Int>? = null, maxLogicalReplicationWorkers: Output<Int>? = null, maxParallelWorkers: Output<Int>? = null, maxParallelWorkersPerGather: Output<Int>? = null, maxPredLocksPerTransaction: Output<Int>? = null, maxPreparedTransactions: Output<Int>? = null, maxReplicationSlots: Output<Int>? = null, maxStackDepth: Output<Int>? = null, maxStandbyArchiveDelay: Output<Int>? = null, maxStandbyStreamingDelay: Output<Int>? = null, maxWalSenders: Output<Int>? = null, maxWorkerProcesses: Output<Int>? = null, pgPartmanBgwInterval: Output<Int>? = null, pgPartmanBgwRole: Output<String>? = null, pgStatStatementsTrack: Output<String>? = null, pgbouncers: Output<List<DatabasePostgresqlConfigPgbouncerArgs>>? = null, sharedBuffersPercentage: Output<Double>? = null, tempFileLimit: Output<Int>? = null, timescaledbs: Output<List<DatabasePostgresqlConfigTimescaledbArgs>>? = null, timezone: Output<String>? = null, trackActivityQuerySize: Output<Int>? = null, trackCommitTimestamp: Output<String>? = null, trackFunctions: Output<String>? = null, trackIoTiming: Output<String>? = null, walSenderTimeout: Output<Int>? = null, walWriterDelay: Output<Int>? = null, workMem: Output<Int>? = null)

Properties

Link copied to clipboard

Specifies a fraction, in a decimal value, 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).

Link copied to clipboard
val autovacuumAnalyzeThreshold: Output<Int>? = null

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

Link copied to clipboard
val autovacuumFreezeMaxAge: Output<Int>? = null

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.

Link copied to clipboard
val autovacuumMaxWorkers: Output<Int>? = null

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.

Link copied to clipboard
val autovacuumNaptime: Output<Int>? = null

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

Link copied to clipboard
val autovacuumVacuumCostDelay: Output<Int>? = null

Specifies the cost delay value, in milliseconds, that will be used in automatic VACUUM operations. If -1, uses the regular vacuum_cost_delay value, which is 20 milliseconds.

Link copied to clipboard
val autovacuumVacuumCostLimit: Output<Int>? = null

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.

Link copied to clipboard
val autovacuumVacuumScaleFactor: Output<Double>? = null

Specifies a fraction, in a decimal value, 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).

Link copied to clipboard
val autovacuumVacuumThreshold: Output<Int>? = null

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

Link copied to clipboard
val backupHour: Output<Int>? = null

The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed.

Link copied to clipboard
val backupMinute: Output<Int>? = null

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

Link copied to clipboard
val bgwriterDelay: Output<Int>? = null

Specifies the delay, in milliseconds, between activity rounds for the background writer. Default is 200 ms.

Link copied to clipboard
val bgwriterFlushAfter: Output<Int>? = null

The amount of kilobytes that need to be written by the background writer before attempting to force the OS to issue these writes to underlying storage. Specified in kilobytes, default is 512. Setting of 0 disables forced writeback.

Link copied to clipboard
val bgwriterLruMaxpages: Output<Int>? = null

The maximum number of buffers that the background writer can write. Setting this to zero disables background writing. Default is 100.

Link copied to clipboard
val bgwriterLruMultiplier: Output<Double>? = null

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.

Link copied to clipboard
val clusterId: Output<String>? = null

The ID of the target PostgreSQL cluster.

Link copied to clipboard
val deadlockTimeout: Output<Int>? = null

The amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition.

Link copied to clipboard
val defaultToastCompression: Output<String>? = null

Specifies the default TOAST compression method for values of compressible columns (the default is lz4). Supported values are: lz4, pglz.

Link copied to clipboard

Time out sessions with open transactions after this number of milliseconds

Link copied to clipboard
val jit: Output<Boolean>? = null

Activates, in a boolean, the system-wide use of Just-in-Time Compilation (JIT).

Link copied to clipboard
val logAutovacuumMinDuration: Output<Int>? = null

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.

Link copied to clipboard
val logErrorVerbosity: Output<String>? = null

Controls the amount of detail written in the server log for each message that is logged. Supported values are: TERSE, DEFAULT, VERBOSE.

Link copied to clipboard
val logLinePrefix: Output<String>? = null

Selects one of the available log-formats. These can support popular log analyzers like pgbadger, pganalyze, etc. Supported values are: pid=%p,user=%u,db=%d,app=%a,client=%h, %m [%p] %q[user=%u,db=%d,app=%a], %t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h.

Link copied to clipboard
val logMinDurationStatement: Output<Int>? = null

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

Link copied to clipboard
val maxFilesPerProcess: Output<Int>? = null

PostgreSQL maximum number of files that can be open per process.

Link copied to clipboard
val maxLocksPerTransaction: Output<Int>? = null

PostgreSQL maximum locks per transaction. Once increased, this parameter cannot be lowered from its set value.

Link copied to clipboard
val maxLogicalReplicationWorkers: Output<Int>? = null

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

Link copied to clipboard
val maxParallelWorkers: Output<Int>? = null

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

Link copied to clipboard
val maxParallelWorkersPerGather: Output<Int>? = null

Sets the maximum number of workers that can be started by a single Gather or Gather Merge node.

Link copied to clipboard
val maxPredLocksPerTransaction: Output<Int>? = null

PostgreSQL maximum predicate locks per transaction.

Link copied to clipboard
val maxPreparedTransactions: Output<Int>? = null

PostgreSQL maximum prepared transactions. Once increased, this parameter cannot be lowered from its set value.

Link copied to clipboard
val maxReplicationSlots: Output<Int>? = null

PostgreSQL maximum replication slots.

Link copied to clipboard
val maxStackDepth: Output<Int>? = null

Maximum depth of the stack in bytes.

Link copied to clipboard
val maxStandbyArchiveDelay: Output<Int>? = null

Max standby archive delay in milliseconds.

Link copied to clipboard
val maxStandbyStreamingDelay: Output<Int>? = null

Max standby streaming delay in milliseconds.

Link copied to clipboard
val maxWalSenders: Output<Int>? = null

PostgreSQL maximum WAL senders. Once increased, this parameter cannot be lowered from its set value.

Link copied to clipboard
val maxWorkerProcesses: Output<Int>? = null

Sets the maximum number of background processes that the system can support. Once increased, this parameter cannot be lowered from its set value.

Link copied to clipboard

PGBouncer connection pooling settings

Link copied to clipboard
val pgPartmanBgwInterval: Output<Int>? = null

Sets the time interval to run pg_partman's scheduled tasks.

Link copied to clipboard
val pgPartmanBgwRole: Output<String>? = null

Controls which role to use for pg_partman's scheduled background tasks. Must consist of alpha-numeric characters, dots, underscores, or dashes. May not start with dash or dot. Maximum of 64 characters.

Link copied to clipboard
val pgStatStatementsTrack: Output<String>? = null

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. Supported values are: all, top, none.

Link copied to clipboard
val sharedBuffersPercentage: Output<Double>? = null

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.

Link copied to clipboard
val tempFileLimit: Output<Int>? = null

PostgreSQL temporary file limit in KiB. If -1, sets to unlimited.

Link copied to clipboard

TimescaleDB extension configuration values

Link copied to clipboard
val timezone: Output<String>? = null

PostgreSQL service timezone

Link copied to clipboard
val trackActivityQuerySize: Output<Int>? = null

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

Link copied to clipboard
val trackCommitTimestamp: Output<String>? = null

Record commit time of transactions. The default value is top. Supported values are: off, on.

Link copied to clipboard
val trackFunctions: Output<String>? = null

Enables tracking of function call counts and time used. The default value is top. Supported values are: all, pl, none.

Link copied to clipboard
val trackIoTiming: Output<String>? = null

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. The default value is top. Supported values are: off, on.

Link copied to clipboard
val walSenderTimeout: Output<Int>? = null

Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. Must be either 0 or between 5000 and 10800000.

Link copied to clipboard
val walWriterDelay: Output<Int>? = null

WAL flush interval in milliseconds. Note that setting this value to lower than the default 200ms may negatively impact performance

Link copied to clipboard
val workMem: Output<Int>? = null

The maximum amount of memory, in MB, used by a query operation (such as a sort or hash table) before writing to temporary disk files. Default is 1MB + 0.075% of total RAM (up to 32MB).

Functions

Link copied to clipboard
open override fun toJava(): DatabasePostgresqlConfigArgs