unlogged-table (GN019)#
Automatic fix is available.
What it does#
Checks for use of unlogged tables.
Why not?#
Unlogged tables are not crash-safe: an unlogged table is automatically truncated after a crash or unclean shutdown. The contents of an unlogged table are also not replicated to standby servers. Any indexes created on an unlogged table are automatically unlogged as well. Any sequences created together with the unlogged table (for identity or serial columns) are also created as unlogged.
When should you?#
The table is transient and its content can be regenerated after a crash or unclean shutdown.
Use instead:#
Use a regular table.