Can I use unlogged tables on Heroku Postgres?

Issue

You would like to use unlogged tables on Heroku Postgres.

Resolution

Creating unlogged tables on Heroku Postgres (CREATE UNLOGGED TABLE) is heavily advised against. Unlogged tables are not crash safe, and will be truncated in the event of a crash or otherwise unclean shutdown, losing all data in the unlogged table in the process.

Additionally, as they are not written to the write-ahead log, they are not covered by Continuous Protection (ref: https://devcenter.heroku.com/articles/heroku-postgres-data-safety-and-continuous-protection).

Finally, as a consequence of not being written to the write-ahead log, unlogged tables are not replicated to followers or high-availabiltiy standbies.

This makes data recovery in unlogged tables impossible in the cases of maintenance operations, as well the aforementioned crashes and unclean shutdowns.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2018 Salesforce.com