{"action":"created","issue":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/3523","repository_url":"https://api.github.com/repos/greenplum-db/gpdb","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/3523/labels{/name}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/3523/comments","events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/3523/events","html_url":"https://github.com/greenplum-db/gpdb/pull/3523","id":265406807,"number":3523,"title":"Refactor dynamic index scans and bitmap scans, to reduce diff vs. ups…","user":{"login":"hlinnaka","id":191602,"avatar_url":"https://avatars2.githubusercontent.com/u/191602?v=4","gravatar_id":"","url":"https://api.github.com/users/hlinnaka","html_url":"https://github.com/hlinnaka","followers_url":"https://api.github.com/users/hlinnaka/followers","following_url":"https://api.github.com/users/hlinnaka/following{/other_user}","gists_url":"https://api.github.com/users/hlinnaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hlinnaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlinnaka/subscriptions","organizations_url":"https://api.github.com/users/hlinnaka/orgs","repos_url":"https://api.github.com/users/hlinnaka/repos","events_url":"https://api.github.com/users/hlinnaka/events{/privacy}","received_events_url":"https://api.github.com/users/hlinnaka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-13T20:15:07Z","updated_at":"2017-10-13T20:23:14Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/3523","html_url":"https://github.com/greenplum-db/gpdb/pull/3523","diff_url":"https://github.com/greenplum-db/gpdb/pull/3523.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/3523.patch"},"body":"…tream.\r\n\r\nMuch of the code and structs used by index scans and bitmap index scans had\r\nbeen fused together and refactored in GPDB, to share code between dynamic\r\nindex scans and regular ones. However, it would be nice to keep upstream\r\ncode unchanged as much as possible. To that end, refactor the exector code\r\nfor dynamic index scans and dynamic bitmap inde scans, to reduce the diff vs\r\nupstream.\r\n\r\nThe Dynamic Index Scan executor node is now a thin wrapper around the\r\nregular Index Scan node, even thinner than before. When a new Dynamic Index\r\nScan begins, we don't do much initialization at that point. When the scan\r\nbegins, we initialize an Index Scan node for the first partition, and return\r\nrows from it until it's exhausted. On next call, the underlying Index Scan\r\nis destroyed, and a new Index Scan node is created, for the next partition,\r\nand so on. Creating and destroying the IndexScanState for every partition\r\nadds some overhead, but it's not significant compared to all the other\r\noverhead of opening and closing the relations, building scan keys etc.\r\n\r\nSimilarly, a Dynamic Bitmap Index Scan executor node is just a thin wrapper\r\nfor regular Bitmap Index Scan. When MultiExecDynamicBitmapIndexScan() is\r\ncalled, it initializes an BitmapIndexScanState for the current partition,\r\nand calls it. On ReScan, the BitmapIndexScan executor node for the old\r\npartiton is shut down. A Dynamic Bitmap Index Scan differs from Dynamic\r\nIndex Scan in that a Dynamic Index Scan is responsible for iterating\r\nthrough all the active partitions, while a Dynamic Bitmap Index Scan works\r\nas a slave for the Dynamic Bitmap Heap Scan node above it.\r\n\r\nIt'd be nice to do a similar refactoring for heap scans, but that's for\r\nanother day."},"comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments/336558125","html_url":"https://github.com/greenplum-db/gpdb/pull/3523#issuecomment-336558125","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/3523","id":336558125,"user":{"login":"hlinnaka","id":191602,"avatar_url":"https://avatars2.githubusercontent.com/u/191602?v=4","gravatar_id":"","url":"https://api.github.com/users/hlinnaka","html_url":"https://github.com/hlinnaka","followers_url":"https://api.github.com/users/hlinnaka/followers","following_url":"https://api.github.com/users/hlinnaka/following{/other_user}","gists_url":"https://api.github.com/users/hlinnaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hlinnaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlinnaka/subscriptions","organizations_url":"https://api.github.com/users/hlinnaka/orgs","repos_url":"https://api.github.com/users/hlinnaka/repos","events_url":"https://api.github.com/users/hlinnaka/events{/privacy}","received_events_url":"https://api.github.com/users/hlinnaka/received_events","type":"User","site_admin":false},"created_at":"2017-10-13T20:23:14Z","updated_at":"2017-10-13T20:23:14Z","author_association":"MEMBER","body":"Another thing that's probably not quite right here is the gpmon stuff. Now that this is creating and destroying IndexScanState and BitmapIndexScanState executor nodes on the fly, they will generate gpmon packets for the begin/end of those nodes too. I'm not sure if that affects accounting somewhere."}}
{"actor":{"display_login":"hlinnaka"}}