<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div class="quote" style="line-height: 1.5"><aekorotkov(at)gmail(dot)com><x4mmm(at)yandex-team(dot)ru><pg(at)bowt(dot)ie><andres(at)anarazel(dot)de><chjischj(at)163(dot)com><teodor(at)sigaev(dot)ru><pgsql-hackers(at)lists(dot)postgresql(dot)org><br><div class="quote" style="line-height: 1.5">hi</div><div class="quote" style="line-height: 1.5">I Have a question. Why the order of unlocking is not adjusted in this patch? like this:</div><div class="quote" style="line-height: 1.5"><br></div><div class="quote" style="line-height: 1.5">if (BufferIsValid(lbuffer))</div><div class="quote" style="line-height: 1.5">UnlockReleaseBuffer(lbuffer);</div><div class="quote" style="line-height: 1.5">if (BufferIsValid(pbuffer))</div><div class="quote" style="line-height: 1.5">UnlockReleaseBuffer(pbuffer);</div><div class="quote" style="line-height: 1.5">if (BufferIsValid(dbuffer))</div><div class="quote" style="line-height: 1.5">UnlockReleaseBuffer(dbuffer);</div><div class="quote" style="line-height: 1.5">==></div><div class="quote" style="line-height: 1.5">if (BufferIsValid(pbuffer))</div><div class="quote" style="line-height: 1.5">UnlockReleaseBuffer(pbuffer);</div><div class="quote" style="line-height: 1.5">if (BufferIsValid(dbuffer))</div><div class="quote" style="line-height: 1.5">UnlockReleaseBuffer(dbuffer);</div><div class="quote" style="line-height: 1.5">if (BufferIsValid(lbuffer))</div><div class="quote" style="line-height: 1.5">UnlockReleaseBuffer(lbuffer);</div><div class="quote" style="line-height: 1.5"><br></div><br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Dec 11, 2018 at 1:50 AM Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:<br>> On Sun, Dec 9, 2018 at 10:25 PM Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:<br>> > On Sat, Dec 8, 2018 at 12:48 PM Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:<br>> > > > 8 дек. 2018 г., в 6:54, Alexander Korotkov <aekorotkov(at)gmail(dot)com> написал(а):<br>> > > ><br>> > > > Yep, please find attached draft patch.<br>> > ><br>> > > Patch seems good to me, I'll check it in more detail.<br>> > > The patch gets posting item at FirstOffsetNumber instead of btree->getLeftMostChild(). This seem OK, since dataGetLeftMostPage() is doing just the same, but with few Assert()s.<br>> ><br>> > I'd like to evade creating GinBtree for just calling<br>> > getLeftMostChild(). Also, few more places in ginvacuum.c do the same.<br>> > We have the same amount of Assert()s in ginVacuumPostingTreeLeaves().<br>> > So, let's keep it uniform.<br>> ><br>> > I would also like Peter Geoghegan to take a look at this patch before<br>> > committing it.<br>><br>> I've slightly adjusted commit message. I'm going to commit this fix<br>> if no objections.<br><br>Please also find patch changing lock order in ginRedoDeletePage()<br>preventing deadlock on standby. I'm going to commit it too.<br><br>------<br>Alexander Korotkov<br>Postgres Professional: http://www.postgrespro.com<br>The Russian Postgres Company</aekorotkov(at)gmail(dot)com></x4mmm(at)yandex-team(dot)ru></aekorotkov(at)gmail(dot)com></aekorotkov(at)gmail(dot)com></blockquote><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote></pgsql-hackers(at)lists(dot)postgresql(dot)org></teodor(at)sigaev(dot)ru></chjischj(at)163(dot)com></andres(at)anarazel(dot)de></pg(at)bowt(dot)ie></x4mmm(at)yandex-team(dot)ru></aekorotkov(at)gmail(dot)com></div></body></html>