HS and clog

Поиск
Список
Период
Сортировка
От Andres Freund
Тема HS and clog
Дата
Msg-id 20130330182006.GJ28736@alap2.anarazel.de
обсуждение исходный текст
Ответы Re: HS and clog  (Simon Riggs <simon@2ndQuadrant.com>)
Re: HS and clog  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Hi,

During the investigation of
http://archives.postgresql.org/message-id/CAL_0b1t%3DWuM6roO8dki%3Dw8DhH8P8whhohbPjReymmQUrOcNT2A%40mail.gmail.com
I noticed that during HS we do the following in RecordKnownAssignedTransactionIds:if (TransactionIdFollows(xid,
latestObservedXid)){   TransactionId next_expected_xid;
 
    /*     * Extend clog and subtrans like we do in GetNewTransactionId() during     * normal operation using
individualextend steps. Typical case     * requires almost no activity.     */    next_expected_xid =
latestObservedXid;   TransactionIdAdvance(next_expected_xid);    while
(TransactionIdPrecedesOrEquals(next_expected_xid,xid))    {        ExtendCLOG(next_expected_xid);
ExtendSUBTRANS(next_expected_xid);
        TransactionIdAdvance(next_expected_xid);    }

Extending subtrans is fine, that's required since its truncated after
restart and because its not really WAL logged, but extending CLOG? Thats
strange, isn't it, since clog is actually WAL logged, so all required
pages will be zeroed from their wal records anyway.
The commit introducing HS changed ExtendCLOG to do/* Zero the page and make an XLOG entry about it
*/ZeroCLOGPage(pageno,!InRecovery);
 
to make that even work during recovery.

Imo this shouldn't be needed.

Simon, do you remember why you added that?  It makes me uneasy doing
something like that only during HS but not during normal crash
recovery/disabled HS.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Satoshi Nagayasu
Дата:
Сообщение: Re: By now, why PostgreSQL 9.2 don't support SSDs?
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Hash Join cost estimates