Re: Disable WAL logging to speed up data loading

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Disable WAL logging to speed up data loading
Дата
Msg-id 20201001.133841.879039809035873298.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Disable WAL logging to speed up data loading  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы RE: Disable WAL logging to speed up data loading  ("osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>)
Список pgsql-hackers
At Thu, 1 Oct 2020 12:58:19 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in 
> the table needs to be rewriitten. One idea for that is to improve that
> command
> so that it skips the table rewrite if wal_level=minimal.
> Of course, also you can change wal_level after marking the table as
> unlogged.

tablecmd.c:

> * There are two reasons for requiring a rewrite when changing
> * persistence: on one hand, we need to ensure that the buffers
> * belonging to each of the two relations are marked with or without
> * BM_PERMANENT properly.  On the other hand, since rewriting creates
> * and assigns a new relfilenode, we automatically create or drop an
> * init fork for the relation as appropriate.

According to this comment, perhaps we can do that at least for
wal_level=minimal.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: New statistics for tuning WAL buffer size
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Logical replication CPU-bound with TRUNCATE/DROP/CREATE many tables