Did we forget to unpin buf in function "revmap_physical_extend" ?

Поиск
Список
Период
Сортировка
От Jinyu Zhang
Тема Did we forget to unpin buf in function "revmap_physical_extend" ?
Дата
Msg-id 60c2fe76.15f2e.14fbc60d61a.Coremail.beijing_pg@163.com
обсуждение исходный текст
Ответы Re: Did we forget to unpin buf in function "revmap_physical_extend" ?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
In function "revmap_physical_extend",  should we add "ReleaseBuffer(buf);" between line 438 and 439 ?
422     else
 423     {
 424         if (needLock)
 425             LockRelationForExtension(irel, ExclusiveLock);
 426 
 427         buf = ReadBuffer(irel, P_NEW);
 428         if (BufferGetBlockNumber(buf) != mapBlk)
 429         {
 430             /*
 431              * Very rare corner case: somebody extended the relation
 432              * concurrently after we read its length.  If this happens, give
 433              * up and have caller start over.  We will have to evacuate that
 434              * page from under whoever is using it.
 435              */
 436             if (needLock)
 437                 UnlockRelationForExtension(irel, ExclusiveLock);
 438             LockBuffer(revmap->rm_metaBuf, BUFFER_LOCK_UNLOCK);
 439             return;
 440         }
 441         LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
 442         page = BufferGetPage(buf);
 443 
 444         if (needLock)
 445             UnlockRelationForExtension(irel, ExclusiveLock);
 446     }

Jinyu,
regards



 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: 9.3.9 and pg_multixact corruption
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Moving SS_finalize_plan processing to the end of planning