Re: WAL logging problem in 9.4.3?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: WAL logging problem in 9.4.3?
Дата
Msg-id 20150703164931.GI3291@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: WAL logging problem in 9.4.3?  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: WAL logging problem in 9.4.3?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 2015-07-04 01:39:42 +0900, Fujii Masao wrote:
> Okay, so probably we need to change WAL replay of TRUNCATE so that
> the index file is truncated to one containing only meta page instead of
> empty one. That is, the WAL replay of TRUNCATE would need to call
> index_build() after smgrtruncate() maybe.
> 
> Then how should we implement that? Invent new WAL record type that
> calls smgrtruncate() and index_build() during WAL replay? Or add the
> special flag to XLOG_SMGR_TRUNCATE record, and make WAL replay
> call index_build() only if the flag is found? Any other good idea?
> Anyway ISTM that we might need to add or modify WAL record.

It's easy enough to log something like a metapage with
log_newpage().

But the more interesting question is why that's not hhappening
today. RelationTruncateIndexes() does call the index_build() which
should end up WAL logging the index creation.




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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: pgbench - allow backslash-continuations in custom scripts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WAL logging problem in 9.4.3?