Configuring Postgres
PostgreSQL postgres configuration nhost.toml database settings shared buffers performance tuning wal settingsPostgres configuration can be tweaked to customize the runtime behavior, peformance, and operational aspects of your Postgres server instance.
Configuration Example
Section titled “Configuration Example”To configure your Postgres instance, simply add the relevant settings under [postgres.settings] in your project’s nhost.toml file.
[postgres]version = '14-20230312-1'
[postgres.resources.compute]cpu = 2000memory = 4096
[postgres.resources.storage]capacity = 20
[postgres.settings]jit = 'off'maxConnections = 100sharedBuffers = '128MB'effectiveCacheSize = '4GB'maintenanceWorkMem = '64MB'checkpointCompletionTarget = 0.9walBuffers = '-1'defaultStatisticsTarget = 100randomPageCost = 4.0effectiveIOConcurrency = 1workMem = '4MB'hugePages = 'try'minWalSize = '80MB'maxWalSize = '1GB'maxWorkerProcesses = 8maxParallelWorkersPerGather = 2maxParallelWorkers = 8maxParallelMaintenanceWorkers = 2walLevel = 'replica'maxWalSenders = 10maxReplicationSlots = 10trackIoTiming = 'on'Resources
Section titled “Resources”- Official documentation from Postgres