From: Robert Haas Date: Thu, 14 Oct 2021 14:29:13 +0000 (-0400) Subject: fix UnlockRelationForExtension second argument some more X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=d240f496f5904c8aad0c9a712c0ddd32c3ad18d0;p=users%2Frhaas%2Fpostgres.git fix UnlockRelationForExtension second argument some more --- diff --git a/src/backend/access/conveyor/conveyor.c b/src/backend/access/conveyor/conveyor.c index d3d300ac3f..d4dd28086e 100644 --- a/src/backend/access/conveyor/conveyor.c +++ b/src/backend/access/conveyor/conveyor.c @@ -948,7 +948,7 @@ ConveyorBeltExtend(ConveyorBelt *cb, BlockNumber blkno, if (blkno < nblocks) { *possibly_not_on_disk_blkno = nblocks; - UnlockRelationForExtension(cb->cb_rel, cb->cb_fork); + UnlockRelationForExtension(cb->cb_rel, ExclusiveLock); return ReadBufferExtended(cb->cb_rel, cb->cb_fork, blkno, RBM_NORMAL, NULL); } @@ -980,7 +980,7 @@ ConveyorBeltExtend(ConveyorBelt *cb, BlockNumber blkno, Assert(BufferGetBlockNumber(buffer) == blkno); /* Done extending relation. */ - UnlockRelationForExtension(cb->cb_rel, cb->cb_fork); + UnlockRelationForExtension(cb->cb_rel, ExclusiveLock); /* Remember that the relation is now longer than it used to be. */ *possibly_not_on_disk_blkno = blkno + 1;