Re: code question: storing INTO relation

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Re: code question: storing INTO relation
Дата
Msg-id 009801c4b81f$df7043b0$ad01a8c0@zaphod
обсуждение исходный текст
Ответ на code question: storing INTO relation  (Neil Conway <neilc@samurai.com>)
Ответы Re: code question: storing INTO relation  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Simon Riggs wrote:

> Neil Conway wrote:
>> Why is that necessary?
>
> So you can choose whether to do this or not.  IMHO, it is important to 
> have
> the optimization, but it shouldn't be the case that EVERY statement is
> forced not to log.
>
> If I risk data loss, I'd like it to be my choice to do this. This effects
> COPY and CREATE INDEX also, though I know you aren't working on those at
> present. I will implement thos eif tyou do this for CTAS.

If I understand the original proposal correctly, there is no risk of data 
loss except in a temporary file. The data would be copied into a new file 
(without wal-logging), but after that, the file would be fsynced and the 
resulting changes would indeed be logged to WAL.

So if there is a crash during the copy, nothing valuable will be lost at 
all. If there is a crash after transaction commit of that transaction, 
nothing will be lost, again... the new file will have been fsynced already 
and everything else will be in WAL.

Best Regards,
Michael Paesold 



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

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: code question: storing INTO relation
Следующее
От: dom@happygiraffe.net (Dominic Mitchell)
Дата:
Сообщение: Re: Should libpq set close-on-exec flag on its socket?