Deep-dive on the Next Gen Platform. Join the Webinar!

Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Troubleshooting Node.js Apps
      • Node.js Behavior in Heroku
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Extending Heroku
  • Heroku Labs
  • Heroku Data Labs: WAL Compression for Postgres Add-ons

Heroku Data Labs: WAL Compression for Postgres Add-ons

English — 日本語に切り替える

Last updated May 02, 2023

Table of Contents

  • Prerequisites
  • Enable WAL Compression
  • Disable WAL Compression
  • Checking Status
  • Impact of WAL Compression on Your Database

Write-Ahead Log (WAL) compression is a feature of Postgres databases that shrinks the size of write-ahead logs in your Postgres database. This compression trades off I/O load on your database for increased CPU load. You can enable this feature on your Heroku Postgres add-on with Heroku Data Labs.

The benefit of WAL compression on your database is dependent on a variety of factors including how your database is used, the amount of used disk space, and if your database has followers. Make sure to monitor your database to understand if WAL compression is right for you.

 

Features added through Heroku Data Labs are experimental and subject to change.

Prerequisites

  • A Standard, Premium, Private, or Shield tier Heroku Postgres database
  • The Heroku Data CLI plugin installed

Enable WAL Compression

$ heroku data:labs:enable wal-compression --addon=YOUR_ADDON_NAME
Enabling wal-compression on YOUR_ADDON_NAME...... done

Enabling the WAL Compression feature updates your Heroku Postgres database configuration, setting wal_compression to on and max_wal_size to 10 GB.

Disable WAL Compression

$ heroku data:labs:disable wal-compression --addon=YOUR_ADDON_NAME
Disabling wal-compression on YOUR_ADDON_NAME...... done

Disabling the WAL Compression feature updates your Heroku Postgres database configuration, setting wal_compression to off and max_wal_size to the default 2 GB.

Applying these changes can take some time. If you receive an error saying the previous configuration is still in progress, try again later.

Checking Status

$ heroku data:labs:list --addon=YOUR_ADDON_NAME
=== Experimental Features Available for YOUR_ADDON_NAME:
[+] wal-compression         Write-ahead log compression on Heroku Postgres addons

A green cross within the box indicates that the WAL compression feature is enabled on your add-on, while an empty box indicates that it’s disabled.

Impact of WAL Compression on Your Database

Enabling WAL compression can reduce the wal-percentage-used metric for your database. Keeping this metric below 75% prevents the throttling of database connection limits. If this metric remains high even after enabling WAL compression, see Reduce WAL Generation for more tips.

While enabling this feature is beneficial to most databases, it can create unnecessary CPU load on some databases. Monitor your database performance to determine the impact of enabling this feature. Ensure that your CPU load stays below 1.0. See Heroku Postgres Monitoring for more info.

Keep reading

  • Heroku Labs

Feedback

Log in to submit feedback.

Heroku Labs: log-runtime-metrics Heroku Labs: Application Metrics Beta Channel

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • heroku.com
  • Terms of Service
  • Privacy (日本語)
  • Cookies
  • Cookie Preferences
  • Your Privacy Choices
  • © 2025 Salesforce.com