While reading patch-2 (2-move-continuation-record-to-page-header.patch) of
WAL Format
Changes(http://archives.postgresql.org/message-id/4FDA5136.6080206@enterpris
edb.com), I had few observations which are summarized below:

 


1. 
@@ -693,7 +693,6 @@ XLogInsert(RmgrId rmid, uint8 info, XLogRecData *rdata) 
 { 
         XLogCtlInsert *Insert = &XLogCtl->Insert; 
         XLogRecord *record; 
-        XLogContRecord *contrecord; 
         XLogRecPtr        RecPtr; 
         XLogRecPtr        WriteRqst; 
         uint32                freespace; 
@@ -1082,9 +1081,7 @@ begin:; 
                 curridx = Insert->curridx; 
                 /* Insert cont-record header */ 
                 Insert->currpage->xlp_info |= XLP_FIRST_IS_CONTRECORD; 
-                contrecord = (XLogContRecord *) Insert->currpos; 
-                contrecord->xl_rem_len = write_len; 
-                Insert->currpos += SizeOfXLogContRecord; 
+                Insert->currpage->xlp_rem_len = write_len; 

After above code changes the comment "/* Insert cont-record header */"
should be changed. 
  
2. 
Is XLP_FIRST_IS_CONTRECORD required after putting xl_rem_len in page header;

Can't we do handling based on xl_rem_len?

 

Sorry for sending the observations in pieces rather than all-together, as I
am not sure how much I will be able to complete.

So what ever I am able to read, I am sending you my doubts or observations.

 

With Regards,

Amit Kapila.

Reply via email to