aman kumar
aman kumar

Reputation: 3156

Aws unlogged table restore

I have one postgres database instance on AWS, replica is allowed on that db instance, one table has been set as unlogged, in that case that table data is not getting replicated.

Upvotes: 0

Views: 737

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269881

From PostgreSQL: Documentation: 11: CREATE TABLE:

UNLOGGED

If specified, the table is created as an unlogged table. Data written to unlogged tables is not written to the write-ahead log (see Chapter 30), which makes them considerably faster than ordinary tables. However, they 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.

Therefore, the behavior matches the documentation.

If you wish the table to be replicated, do not use an UNLOGGED table.

Upvotes: 4

Related Questions