PostgreSQL WAL

About the WAL

PostgreSQL uses WAL to help ensure efficient and reliable operation by writing changes to data files only after those changes have been logged. This reduces write transaction overhead and provides a record of changes to your tables and indexes.

The WAL is also backed up and included in all the automatic backups that are a part of Compose deployments. It holds around the last 24 hours of the write and file change trransactions for your databases.

WAL and Billing

PostgreSQL usage calculations include the space used by the WAL, reflecting the actual space used by a PostgreSQL deployment, not just the space that is allocated to your data. For deployments that don't have a have high write volume, the space used by the WAL will not greatly affect your spend. But if you have a database with lots of write transactions or periods of high activity, the WAL log will grow. This growth can trigger scaling events and cause your deployment to scale up. This will increase the cost of your deployment.

If you anticipate a period of high activity, you can allocate additional resources ahead of time through the Resources and Scaling pane on your deployment. Likewise, if you know that the number of write transactions on your deployment has decreased, it's possible the size of the WAL and your backups has decreased. Check your usage on the Overview pane; it's possible you can scale down your deployment and reduce it's allocated resources.

Still Need Help?

If this article didn't solve things, summon a human and get some help!