Re: Question regarding heap_multi_insert documentation
Daniel Gustafsson <[email protected]> Mon, 13 Jan 2020 00:40:20 +0100
| Newsgroups | gmane.comp.db.postgresql.devel.general |
|---|---|
| Message-ID | <[email protected]> |
> On 13 Jan 2020, at 00:25, Tom Lane <[email protected]> wrote: > > Daniel Gustafsson <[email protected]> writes: >> The part I don't understand is "otherwise there race condition", it doesn't >> sound complete to me as a non-native english speaker. Should that really be >> "otherwise there *is a (potential)* race condition" or something similar? > > I agree, it's missing "is a". Thanks for clarifying. PFA tiny patch for this. cheers ./daniel
multiinsert_comment.diff
(application/octet-stream, 854 B)
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 7b8490d4e5..5ddb6e85e9 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -2145,7 +2145,7 @@ heap_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples, * that check MUST be done at least past the point of acquiring an * exclusive buffer content lock on every buffer that will be affected, * and MAY be done after all inserts are reflected in the buffers and - * those locks are released; otherwise there race condition. Since + * those locks are released; otherwise there is a race condition. Since * multiple buffers can be locked and unlocked in the loop below, and it * would not be feasible to identify and lock all of those buffers before * the loop, we must do a final check at the end.