{"action":"created","issue":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/490","repository_url":"https://api.github.com/repos/greenplum-db/gpdb","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/490/labels{/name}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/490/comments","events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/490/events","html_url":"https://github.com/greenplum-db/gpdb/pull/490","id":139516882,"number":490,"title":"Fix rescan support for external scan nodes.","user":{"login":"hlinnaka","id":191602,"avatar_url":"https://avatars.githubusercontent.com/u/191602?v=3","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,"milestone":null,"comments":5,"created_at":"2016-03-09T09:02:39Z","updated_at":"2016-03-10T08:30:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/490","html_url":"https://github.com/greenplum-db/gpdb/pull/490","diff_url":"https://github.com/greenplum-db/gpdb/pull/490.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/490.patch"},"body":"Instead of pushing the responsibility to rescanning down to each different\r\nkind of external table, custom, EXECUTE, or file, implement rescanning\r\nin fileam.c in a generic fashion, by closing and reopening the underlying\r\n\"url\". This gets us rescan support for custom and EXECUTE-type external\r\ntables, which was missing before. The missing support caused a crash if you\r\nhave a plan that requires rescanning, as the one added in the regression\r\ntest."},"comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments/194732376","html_url":"https://github.com/greenplum-db/gpdb/pull/490#issuecomment-194732376","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/490","id":194732376,"user":{"login":"danielgustafsson","id":321790,"avatar_url":"https://avatars.githubusercontent.com/u/321790?v=3","gravatar_id":"","url":"https://api.github.com/users/danielgustafsson","html_url":"https://github.com/danielgustafsson","followers_url":"https://api.github.com/users/danielgustafsson/followers","following_url":"https://api.github.com/users/danielgustafsson/following{/other_user}","gists_url":"https://api.github.com/users/danielgustafsson/gists{/gist_id}","starred_url":"https://api.github.com/users/danielgustafsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielgustafsson/subscriptions","organizations_url":"https://api.github.com/users/danielgustafsson/orgs","repos_url":"https://api.github.com/users/danielgustafsson/repos","events_url":"https://api.github.com/users/danielgustafsson/events{/privacy}","received_events_url":"https://api.github.com/users/danielgustafsson/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T08:30:52Z","updated_at":"2016-03-10T08:30:52Z","body":"I think this is the cleanest way to reliably support rescans, which is something we have to do regardless like @hlinnaka says. If rescanning really becomes a performance problem can't we add a cost estimate along the line of `external_table_rescan_cost=x.y` to be able to influence the planner to weight against plans that favour rescanning?"}}