Skip to content

Commit 9a6a147

Browse files
committed
pathman: overlap check fixed
1 parent 0f30f01 commit 9a6a147

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

contrib/pathman/init.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,16 @@ load_check_constraints(Oid parent_oid)
285285
/* Copy oids to prel */
286286
for(i=0; i < proc; i++)
287287
children[i] = ranges[i].child_oid;
288-
}
289288

290-
/* Check if some ranges overlap */
291-
for(i=0; i < proc-1; i++)
292-
{
293-
if (ranges[i].max > ranges[i+1].min)
289+
/* Check if some ranges overlap */
290+
for(i=0; i < proc-1; i++)
294291
{
295-
elog(WARNING, "Partitions %u and %u overlap. Disabling pathman for relation %u...",
296-
ranges[i].child_oid, ranges[i+1].child_oid, parent_oid);
297-
hash_search(relations, (const void *) &parent_oid, HASH_REMOVE, &found);
292+
if (ranges[i].max > ranges[i+1].min)
293+
{
294+
elog(WARNING, "Partitions %u and %u overlap. Disabling pathman for relation %u...",
295+
ranges[i].child_oid, ranges[i+1].child_oid, parent_oid);
296+
hash_search(relations, (const void *) &parent_oid, HASH_REMOVE, &found);
297+
}
298298
}
299299
}
300300
}

0 commit comments

Comments
 (0)