projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3e1a22
)
lock the buffer
author
Robert Haas
<
[email protected]
>
Thu, 23 Sep 2021 15:36:53 +0000
(11:36 -0400)
committer
Robert Haas
<
[email protected]
>
Thu, 23 Sep 2021 15:36:53 +0000
(11:36 -0400)
src/backend/access/conveyor/conveyor.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/access/conveyor/conveyor.c
b/src/backend/access/conveyor/conveyor.c
index c8200083a0c46be724eb66c72359d78aea888d81..5e50e647547f95150ed3597cee9f078976f884f6 100644
(file)
--- a/
src/backend/access/conveyor/conveyor.c
+++ b/
src/backend/access/conveyor/conveyor.c
@@
-422,8
+422,11
@@
ConveyorBeltGetNewPage(ConveyorBelt *cb, CBPageNo *pageno)
errmsg_internal("next block should be %u but relation has only %u blocks",
next_blkno, nblocks));
else if (next_blkno == nblocks)
+ {
buffer = ReadBufferExtended(cb->cb_rel, cb->cb_fork,
P_NEW, RBM_NORMAL, NULL);
+ LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE);
+ }
UnlockRelationForExtension(cb->cb_rel, ExclusiveLock);
}