Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6593c5b

Browse files
committed
Fix bug in freespace calculation in heap_multi_insert().
If the amount of freespace on page was less than the amount reserved byfillfactor, the calculation would underflow.This fixes bug #6643 reported by Tomonari Katsumata.
1 parent00b0c73 commit6593c5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2159,7 +2159,7 @@ heap_multi_insert(Relation relation, HeapTuple *tuples, int ntuples,
21592159
{
21602160
HeapTupleheaptup=heaptuples[ndone+nthispage];
21612161

2162-
if (PageGetHeapFreeSpace(page)-saveFreeSpace<MAXALIGN(heaptup->t_len))
2162+
if (PageGetHeapFreeSpace(page)<MAXALIGN(heaptup->t_len)+saveFreeSpace)
21632163
break;
21642164

21652165
RelationPutHeapTuple(relation,buffer,heaptup);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp