diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/heap/hio.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c index e152807d2dc..7479212d4e0 100644 --- a/src/backend/access/heap/hio.c +++ b/src/backend/access/heap/hio.c @@ -624,6 +624,13 @@ loop: buffer = ReadBufferBI(relation, P_NEW, RBM_ZERO_AND_LOCK, bistate); /* + * Release the file-extension lock; it's now OK for someone else to extend + * the relation some more. + */ + if (needLock) + UnlockRelationForExtension(relation, ExclusiveLock); + + /* * We need to initialize the empty new page. Double-check that it really * is empty (this should never happen, but if it does we don't want to * risk wiping out valid data). @@ -648,13 +655,6 @@ loop: } /* - * Release the file-extension lock; it's now OK for someone else to extend - * the relation some more. - */ - if (needLock) - UnlockRelationForExtension(relation, ExclusiveLock); - - /* * Lock the other buffer. It's guaranteed to be of a lower page number * than the new page. To conform with the deadlock prevent rules, we ought * to lock otherBuffer first, but that would give other backends a chance |