Skip to main content
Latitude.sh allows you to customize PostgreSQL and connection pooler parameters to optimize your database for your specific workload. You can configure these parameters from the Parameters tab in your database dashboard.

PostgreSQL parameters

The following PostgreSQL parameters can be customized based on your database plan.

Connection parameters

Memory parameters

Timeout parameters

WAL & Checkpoint parameters

Autovacuum parameters

Connection pooler (PgBouncer)

PgBouncer is a connection pooler that sits between your application and PostgreSQL. It efficiently manages database connections, reducing overhead and improving performance.

Pool settings

Connection limits

Timeouts

Default values are optimized for each database plan to provide stable operation within your plan’s resources. You have full control over parameter values, but we recommend staying close to these defaults unless you have specific requirements.
Values significantly outside recommended ranges will be highlighted in the dashboard. While you can set any value, extreme settings may impact database stability or performance.

Configuring parameters

  1. Go to Databases and select your database.
  2. Click the Parameters tab.
  3. Click Manage next to PostgreSQL or Pooler parameters.
  4. Click on any parameter row to expand it and view the input field and allowed range.
  5. Adjust the value as needed. A warning indicator appears if the value is outside the recommended range.
  6. Click Restore defaults to reset all parameters to plan defaults, or Apply to save your changes.
Parameter changes trigger a rolling restart of your database pods. This ensures the new configuration is applied safely with minimal downtime.

Best practices

  • Start with defaults: The default values are tuned for typical workloads. Only adjust if you have specific requirements.
  • Monitor after changes: Watch your database metrics after making parameter changes to ensure the desired effect.
  • Work Memory caution: High work_mem values can cause memory issues since this is allocated per operation. Calculate: work_mem × max_connections × average_operations.
  • Use connection pooling: For applications with many short-lived connections, the connection pooler significantly reduces overhead.
  • Transaction mode: Use transaction pool mode unless your application requires session-level features like prepared statements or advisory locks.