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

Commit5092aae

Browse files
committed
Use bms_add_members() instead of bms_union() when possible
bms_union() causes a new set to be allocated. What this caller needs ismembers added to an existing set. bms_add_members() is the tool forthat job.This is just a matter of fixing an inefficiency due to surplus memoryallocations. No bugs being fixed.The only other place I found that might be valid to apply this change isin markNullableIfNeeded(), but I opted not to do that due to the risk toreward ratio not looking favorable. The risk being that there *could* beanother pointer pointing to the Bitmapset.Author: David Rowley <dgrowleyml@gmail.com>Reviewed-by: Greg Burd <greg@burd.me>Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/CAApHDvoCcoS-p5tZNJLTxFOKTYNjqVh7Dwf+5ikDUBwnvWftRw@mail.gmail.com
1 parentf8f4afe commit5092aae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/optimizer/prep/prepunion.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ generate_union_paths(SetOperationStmt *op, PlannerInfo *root,
802802
linitial(rel->partial_pathlist));
803803
}
804804

805-
relids=bms_union(relids,rel->relids);
805+
relids=bms_add_members(relids,rel->relids);
806806
}
807807

808808
/* Build result relation. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp