Re: visibilitymap_set and checksums
От | Andres Freund |
---|---|
Тема | Re: visibilitymap_set and checksums |
Дата | |
Msg-id | 20130524192619.GI29374@alap2.anarazel.de обсуждение исходный текст |
Ответ на | Re: visibilitymap_set and checksums (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: visibilitymap_set and checksums
|
Список | pgsql-hackers |
On 2013-05-24 19:09:57 +0100, Simon Riggs wrote: > On 24 May 2013 18:40, Andres Freund <andres@2ndquadrant.com> wrote: > > > That pattern looks dangerous. Setting the lsn of the heap page will > > prevent the next action from doing a FPI even if it would be required. > > Can you be more specific about the danger you see? CHECKPOINT at lsn 0/10; vacuum starts vacuum finds page which is all visible vacuum sets all_visible PageSetAllVisible(page); MarkBufferDirty(buf); visibilitymap_set(onerel, blkno, buf, InvalidXLogRecPtr, vmbuffer, visibility_cutoff_xid); recptr = log_heap_visible(rel->rd_node, heapBuf,vmBuf, cutoff_xid); if (DataChecksumsEnabled()) PageSetLSN(heapPage,recptr); So at this point the *heap* page will have the lsn of the xl_heap_visible record. Which I thought to be rather dangerous because I somewow missed the fact that log_heap_visible does:if (DataChecksumsEnabled()){ rdata[1].next = &(rdata[2]); rdata[2].data = NULL; rdata[2].len = 0; rdata[2].buffer = heap_buffer; rdata[2].buffer_std = true; rdata[2].next= NULL;} So. Forget what I said, I just was confused. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: