Patch-2 (2-move-continuation-record-to-page-header.patch) WAL Format Changes
От | Amit Kapila |
---|---|
Тема | Patch-2 (2-move-continuation-record-to-page-header.patch) WAL Format Changes |
Дата | |
Msg-id | 000301cd553b$e60e2310$b22a6930$@kapila@huawei.com обсуждение исходный текст |
Список | pgsql-hackers |
<div class="WordSection1"><p class="MsoNormal">While reading patch-2 (2-move-continuation-record-to-page-header.patch) ofWAL Format Changes(<a href="http://archives.postgresql.org/message-id/4FDA5136.6080206@enterprisedb.com">http://archives.postgresql.org/message-id/4FDA5136.6080206@enterprisedb.com</a>), Ihad few observations which are summarized below:<p class="MsoNormal"> <p class="MsoNormal"><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">1.</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">@@-693,7 +693,6 @@ XLogInsert(RmgrId rmid, uint8 info, XLogRecData*rdata)</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> {</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> XLogCtlInsert *Insert = &XLogCtl->Insert;</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> XLogRecord *record;</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">- XLogContRecord *contrecord;</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> XLogRecPtr RecPtr;</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> XLogRecPtr WriteRqst;</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> uint32 freespace;</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">@@ -1082,9 +1081,7 @@ begin:;</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> curridx = Insert->curridx;</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> /* Insertcont-record header */</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> Insert->currpage->xlp_info|= XLP_FIRST_IS_CONTRECORD;</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">- contrecord = (XLogContRecord *) Insert->currpos;</span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">- contrecord->xl_rem_len= write_len;</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">- Insert->currpos += SizeOfXLogContRecord;</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">+ Insert->currpage->xlp_rem_len = write_len;</span><br/><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">After above code changes thecomment "/* Insert cont-record header */" should be changed.</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><br/><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">2.</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">IsXLP_FIRST_IS_CONTRECORD required after putting xl_rem_len inpage header;</span><br /><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Can't we do handling based onxl_rem_len?</span><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><p class="MsoNormal"><spanstyle="font-size:10.0pt;font-family:"Arial","sans-serif"">Sorry for sending the observations in piecesrather than all-together, as I am not sure how much I will be able to complete.</span><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Sowhat ever I am able to read, I am sending you my doubts or observations.</span><pclass="MsoNormal"> <p class="MsoNormal">With Regards,<p class="MsoNormal">Amit Kapila.</div>
В списке pgsql-hackers по дате отправления: