fix2.diff

text/x-patch

Filename: fix2.diff
Type: text/x-patch
Part: 1
Message: Re: page corruption on 8.3+ that makes it to standby

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: context
File+
src/backend/commands/tablecmds.c 7 0
*** a/src/backend/commands/tablecmds.c
--- b/src/backend/commands/tablecmds.c
***************
*** 7082,7089 **** copy_relation_data(SMgrRelation src, SMgrRelation dst,
  
  		smgrread(src, forkNum, blkno, buf);
  
! 		/* XLOG stuff */
! 		if (use_wal)
  			log_newpage(&dst->smgr_rnode, forkNum, blkno, page);
  
  		/*
--- 7082,7094 ----
  
  		smgrread(src, forkNum, blkno, buf);
  
! 		/*
! 		 * XLOG stuff
! 		 *
! 		 * Don't log page if it's new, because that will set the LSN
! 		 * and TLI, corrupting the page.
! 		 */
! 		if (use_wal && !PageIsNew(page))
  			log_newpage(&dst->smgr_rnode, forkNum, blkno, page);
  
  		/*