restore PD_PAGE_FULL on WAL update replay

Started by Alvaro Herreraabout 17 years ago2 messages
#1Alvaro Herrera
alvherre@commandprompt.com
1 attachment(s)

This patch ensures that the PD_PAGE_FULL bit is restored after replaying
a heap_update WAL record. I think this must have been overlooked on the
HOT patch.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Attachments:

setfull.patchtext/x-diff; charset=us-asciiDownload
*** src/backend/access/heap/heapam.c	31 Oct 2008 19:40:26 -0000	1.268
--- src/backend/access/heap/heapam.c	7 Nov 2008 15:29:04 -0000
***************
*** 4389,4394 ****
--- 4389,4396 ----
  	 */
  	if (samepage)
  		goto newsame;
+ 	if (!hot_update && !move)
+ 		PageSetFull(page);
  	PageSetLSN(page, lsn);
  	PageSetTLI(page, ThisTimeLineID);
  	MarkBufferDirty(buffer);
#2Pavan Deolasee
pavan.deolasee@gmail.com
In reply to: Alvaro Herrera (#1)
Re: restore PD_PAGE_FULL on WAL update replay

On Fri, Nov 7, 2008 at 9:12 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:

This patch ensures that the PD_PAGE_FULL bit is restored after replaying
a heap_update WAL record. I think this must have been overlooked on the
HOT patch.

Since PD_PAGE_FULL is just a hint, I think we might have deliberately
left it that way. Even if we want to fix this, we should also replay
the action of clearing the bit in heap_xlog_clean()

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com