Please help me understand unlogged tables

Поиск
Список
Период
Сортировка
От Alexander Stoddard
Тема Please help me understand unlogged tables
Дата
Msg-id CADDNc-Bro0MvGxr7VTCLjryg_KxUVGT7Kt_Md1jV0jbfz1w6Kw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Please help me understand unlogged tables  (Jeff Janes <jeff.janes@gmail.com>)
Re: Please help me understand unlogged tables  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general
If a table is set to unlogged is it inherently non-durable? That, is any crash or unsafe shutdown _must_ result in truncation upon recovery?

I can imagine a table that is bulk loaded in a warehousing scenario and then sitting statically could be safe, but maybe the question becomes how could the system know it is unchanged if it isn't logged...

Would a correct solution be to bulk load into an unlogged table and then (fairly cheaply?) set the table back to being logged? 

If I my mental model is correct the table would be liable to being lost to a crash during loading but once set back to logged it is durable. Is that correct?

Is it the case that setting a large table to logged status after loading it unlogged is a reasonably cheap operation?

Thank you,
Alex Stoddard

В списке pgsql-general по дате отправления:

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: postgres for production
Следующее
От: Abhra Kar
Дата:
Сообщение: Equivalent shell script of create user and schema in specificpostgres db