Re: AW: WAL-based allocation of XIDs is insecure

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: AW: WAL-based allocation of XIDs is insecure
Дата
Msg-id 5423.983892035@sss.pgh.pa.us
обсуждение исходный текст
Ответ на AW: WAL-based allocation of XIDs is insecure  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
Список pgsql-hackers
Zeugswetter Andreas SB  <ZeugswetterA@wien.spardat.at> writes:
>> 5. We will now run a new transaction with the same XID that was in use
>> before the crash.  If that transaction commits, then we have a tuple on
>> disk that will be considered valid --- and should not be.

> I do not think this is true. Before any modification to a page the
> original page will be written to the log (aka physical log).

Hmm.  Actually, what is written to the log is the *modified* page not
its original contents.  However, on studying the buffer manager I see
that it tries to fsync the log entry describing the last mod to a data
page before it writes out the page itself.  So perhaps that can be
relied on to ensure all XIDs known in the heap are known in the log.

However, I'd just as soon have the NEXTXID log records too to be doubly
sure.  I do now agree that we needn't fsync the NEXTXID records,
however.
        regards, tom lane


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

Предыдущее
От: "Lu Raymond"
Дата:
Сообщение: There is error at the examples in PL/pgSQL
Следующее
От: Christof Petig
Дата:
Сообщение: Query Planning time increased 3 times on 7.1 compared to 7.0.3