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