Re: alter table xxx set unlogged take long time

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: alter table xxx set unlogged take long time
Дата
Msg-id CAKFQuwapFJBOdUPs=ZYsVcDiticJ3mDR2NZ2KxrknPoYBO3iaw@mail.gmail.com
обсуждение исходный текст
Ответ на RE: alter table xxx set unlogged take long time  ("James Pang (chaolpan)" <chaolpan@cisco.com>)
Список pgsql-performance
On Tue, Jul 26, 2022 at 5:45 AM James Pang (chaolpan) <chaolpan@cisco.com> wrote:
Without step 3 ,  copy data take long time.   Use wal_level=minimal can help make COPY load data without logging ?


I believe you are referring to:


Since the final state of your table will be "logged" relying on the above optimization is the correct path, if you enable "logged" at the end, even with wal_level=minimal, you do not benefit from the optimization and thus your data ends up being written to WAL.

Otherwise, it is overall time that matters, it's no use boasting the COPY is fast if you end up spending hours waiting for ALTER TABLE at the end.

David J.

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

Предыдущее
От: "James Pang (chaolpan)"
Дата:
Сообщение: RE: alter table xxx set unlogged take long time
Следующее
От: Rick Otten
Дата:
Сообщение: Postgresql 14 partitioning advice