Re: Disable WAL logging to speed up data loading

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Disable WAL logging to speed up data loading
Дата
Msg-id 160c04197d61c66fbe1fd8a60ba22eebd2eca72e.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Disable WAL logging to speed up data loading  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Disable WAL logging to speed up data loading  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
On Mon, 2021-03-22 at 11:05 -0400, Stephen Frost wrote:
> > Perhaps allowing to set unlogged tables to logged ones without writing WAL
> > is a more elegant way to do that, but I cannot see how that would be any
> > more crash safe than this patch.  Besides, the feature doesn't exist yet.
> 
> I'm not suggesting it's somehow more crash safe- but it's at least very
> clear what happens in such a case, to wit: the entire table is cleared
> on crash recovery.

I didn't look at the patch, but are you saying that after changing the
table to LOGGED, it somehow remembers that it is not crash safe and is
emptied if there is a crash before the next checkpoint?

Wouldn't that cause corruption if you restore from an earlier backup?
At least with the feature in this thread we'd get an error on recovery.

Yours,
Laurenz Albe




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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Add docs stub for recovery.conf
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Change default of checkpoint_completion_target