Re: WAL logging of SELECT ... INTO command

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: WAL logging of SELECT ... INTO command
Дата
Msg-id dvqqi5$1nmv$1@news.hub.org
обсуждение исходный текст
Ответ на WAL logging of SELECT ... INTO command  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: WAL logging of SELECT ... INTO command  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-performance
"Simon Riggs" <simon@2ndquadrant.com> wrote
> On Tue, 2006-03-21 at 06:22 -0600, Jim C. Nasby wrote:
> > Currently, it appears that SELECT * INTO new_table FROM old_table logs
> > each page as it's written to WAL. Is this actually needed? Couldn't the
> > database simply log that the SELECT ... INTO statement was executed
> > instead? Doing so would likely result in a large performance improvement
> > in most installs. Is there no provision for writing anything but data
> > page changes (or whole pages) to WAL?
>
> AFAIK it takes the same code path as CREATE TABLE AS SELECT, which
> already does exactly what you suggest (except when using PITR).
>

As I read, they did take the same code path, but did they "simply log that
the SELECT ... INTO statement was executed"? If so, how can we rely on the
unreliable content of the old_table to do recovery?

Regards,
Qingqing


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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: WAL logging of SELECT ... INTO command
Следующее
От: "Jojo Paderes"
Дата:
Сообщение: Scaling up PostgreSQL in Multiple CPU / Dual Core Powered Servers