Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • 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
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Java Advanced Topics
      • Working with Spring Boot
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • 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 March 06, 2023

Table of Contents

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

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
  • Podcasts
  • Support Channels
  • Status

Language Reference

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

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences