Re: Skip WAL in ALTER TABLE

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Skip WAL in ALTER TABLE
Дата
Msg-id 1255591186.30088.1060.camel@ebony
обсуждение исходный текст
Ответ на Re: Skip WAL in ALTER TABLE  (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Ответы Re: Skip WAL in ALTER TABLE
Список pgsql-hackers
On Thu, 2009-10-15 at 13:18 +0900, Itagaki Takahiro wrote:
> Simon Riggs <simon@2ndQuadrant.com> wrote:
> 
> > > Is it possible to use WAL-skipping and BulkInsertState in ATRewriteTable() ?
> > > If ok, I'll submit a patch for the next commitfest.
> > 
> > Yes
> 
> Patch attached.
> This patch skip WAL writes during table rewrites from ALTER TABLE.

Looks fine to me, apart from
if (!XLogArchivingActive() || newrel->rd_istemp)hi_options |= HEAP_INSERT_SKIP_WAL;

I think the second condition is unnecessary, so just
if (!XLogArchivingActive())hi_options |= HEAP_INSERT_SKIP_WAL;

which is what COPY does. Temp tables are excluded in heap_insert()

-- Simon Riggs           www.2ndQuadrant.com



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: CommitFest 2009-09, two weeks on
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Hot standby status