{"action":"opened","number":6484,"pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/6484","id":238309382,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MzA5Mzgy","html_url":"https://github.com/greenplum-db/gpdb/pull/6484","diff_url":"https://github.com/greenplum-db/gpdb/pull/6484.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/6484.patch","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/6484","number":6484,"state":"open","locked":false,"title":"Unstable output of UPDATE RETURNING on replicated tables","user":{"login":"zhangjackey","id":35027678,"node_id":"MDQ6VXNlcjM1MDI3Njc4","avatar_url":"https://avatars2.githubusercontent.com/u/35027678?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangjackey","html_url":"https://github.com/zhangjackey","followers_url":"https://api.github.com/users/zhangjackey/followers","following_url":"https://api.github.com/users/zhangjackey/following{/other_user}","gists_url":"https://api.github.com/users/zhangjackey/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangjackey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangjackey/subscriptions","organizations_url":"https://api.github.com/users/zhangjackey/orgs","repos_url":"https://api.github.com/users/zhangjackey/repos","events_url":"https://api.github.com/users/zhangjackey/events{/privacy}","received_events_url":"https://api.github.com/users/zhangjackey/received_events","type":"User","site_admin":false},"body":"If A is a replicated table which is distributed on 3 segments and\r\nB is a replicated table which is distributed on 2 segments, If we\r\nexecute 'UPDATE A SET xxx FROM B WHERE xxx', it will generate a\r\nsub-plan for 'A JOIN B', then we should add a Broadcast Motion\r\nupon the B because A is on 3 segments, all the tuple of A need to\r\ndo UPDATE, The correct plan maybe like that:\r\n\r\n```\r\nModifyTable(UPDATE)\r\n    ->Hash Join\r\n        -> SeqScan A\r\n        -> Create hash table\r\n            ->Broadcast Motion\r\n                ->SeqScan B\r\n```\r\n","created_at":"2018-12-13T08:56:13Z","updated_at":"2018-12-13T08:56:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/6484/commits","review_comments_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/6484/comments","review_comment_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/6484/comments","statuses_url":"https://api.github.com/repos/greenplum-db/gpdb/statuses/bea94d1ed683fec5cc98628a5758d47667ffefb1","head":{"label":"zhangjackey:rpt_returning","ref":"rpt_returning","sha":"bea94d1ed683fec5cc98628a5758d47667ffefb1","user":{"login":"zhangjackey","id":35027678,"node_id":"MDQ6VXNlcjM1MDI3Njc4","avatar_url":"https://avatars2.githubusercontent.com/u/35027678?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangjackey","html_url":"https://github.com/zhangjackey","followers_url":"https://api.github.com/users/zhangjackey/followers","following_url":"https://api.github.com/users/zhangjackey/following{/other_user}","gists_url":"https://api.github.com/users/zhangjackey/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangjackey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangjackey/subscriptions","organizations_url":"https://api.github.com/users/zhangjackey/orgs","repos_url":"https://api.github.com/users/zhangjackey/repos","events_url":"https://api.github.com/users/zhangjackey/events{/privacy}","received_events_url":"https://api.github.com/users/zhangjackey/received_events","type":"User","site_admin":false},"repo":{"id":141078977,"node_id":"MDEwOlJlcG9zaXRvcnkxNDEwNzg5Nzc=","name":"gpdb","full_name":"zhangjackey/gpdb","private":false,"owner":{"login":"zhangjackey","id":35027678,"node_id":"MDQ6VXNlcjM1MDI3Njc4","avatar_url":"https://avatars2.githubusercontent.com/u/35027678?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangjackey","html_url":"https://github.com/zhangjackey","followers_url":"https://api.github.com/users/zhangjackey/followers","following_url":"https://api.github.com/users/zhangjackey/following{/other_user}","gists_url":"https://api.github.com/users/zhangjackey/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangjackey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangjackey/subscriptions","organizations_url":"https://api.github.com/users/zhangjackey/orgs","repos_url":"https://api.github.com/users/zhangjackey/repos","events_url":"https://api.github.com/users/zhangjackey/events{/privacy}","received_events_url":"https://api.github.com/users/zhangjackey/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zhangjackey/gpdb","description":"Greenplum Database","fork":true,"url":"https://api.github.com/repos/zhangjackey/gpdb","forks_url":"https://api.github.com/repos/zhangjackey/gpdb/forks","keys_url":"https://api.github.com/repos/zhangjackey/gpdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhangjackey/gpdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhangjackey/gpdb/teams","hooks_url":"https://api.github.com/repos/zhangjackey/gpdb/hooks","issue_events_url":"https://api.github.com/repos/zhangjackey/gpdb/issues/events{/number}","events_url":"https://api.github.com/repos/zhangjackey/gpdb/events","assignees_url":"https://api.github.com/repos/zhangjackey/gpdb/assignees{/user}","branches_url":"https://api.github.com/repos/zhangjackey/gpdb/branches{/branch}","tags_url":"https://api.github.com/repos/zhangjackey/gpdb/tags","blobs_url":"https://api.github.com/repos/zhangjackey/gpdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhangjackey/gpdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhangjackey/gpdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhangjackey/gpdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhangjackey/gpdb/statuses/{sha}","languages_url":"https://api.github.com/repos/zhangjackey/gpdb/languages","stargazers_url":"https://api.github.com/repos/zhangjackey/gpdb/stargazers","contributors_url":"https://api.github.com/repos/zhangjackey/gpdb/contributors","subscribers_url":"https://api.github.com/repos/zhangjackey/gpdb/subscribers","subscription_url":"https://api.github.com/repos/zhangjackey/gpdb/subscription","commits_url":"https://api.github.com/repos/zhangjackey/gpdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhangjackey/gpdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhangjackey/gpdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhangjackey/gpdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhangjackey/gpdb/contents/{+path}","compare_url":"https://api.github.com/repos/zhangjackey/gpdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhangjackey/gpdb/merges","archive_url":"https://api.github.com/repos/zhangjackey/gpdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhangjackey/gpdb/downloads","issues_url":"https://api.github.com/repos/zhangjackey/gpdb/issues{/number}","pulls_url":"https://api.github.com/repos/zhangjackey/gpdb/pulls{/number}","milestones_url":"https://api.github.com/repos/zhangjackey/gpdb/milestones{/number}","notifications_url":"https://api.github.com/repos/zhangjackey/gpdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhangjackey/gpdb/labels{/name}","releases_url":"https://api.github.com/repos/zhangjackey/gpdb/releases{/id}","deployments_url":"https://api.github.com/repos/zhangjackey/gpdb/deployments","created_at":"2018-07-16T02:51:45Z","updated_at":"2018-07-16T02:52:15Z","pushed_at":"2018-12-13T08:40:54Z","git_url":"git://github.com/zhangjackey/gpdb.git","ssh_url":"git@github.com:zhangjackey/gpdb.git","clone_url":"https://github.com/zhangjackey/gpdb.git","svn_url":"https://github.com/zhangjackey/gpdb","homepage":"http://greenplum.org","size":333474,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"greenplum-db:master","ref":"master","sha":"c2e3840351bd68e71107d0604a204cb2c3ecb5e1","user":{"login":"greenplum-db","id":14097842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDk3ODQy","avatar_url":"https://avatars2.githubusercontent.com/u/14097842?v=4","gravatar_id":"","url":"https://api.github.com/users/greenplum-db","html_url":"https://github.com/greenplum-db","followers_url":"https://api.github.com/users/greenplum-db/followers","following_url":"https://api.github.com/users/greenplum-db/following{/other_user}","gists_url":"https://api.github.com/users/greenplum-db/gists{/gist_id}","starred_url":"https://api.github.com/users/greenplum-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenplum-db/subscriptions","organizations_url":"https://api.github.com/users/greenplum-db/orgs","repos_url":"https://api.github.com/users/greenplum-db/repos","events_url":"https://api.github.com/users/greenplum-db/events{/privacy}","received_events_url":"https://api.github.com/users/greenplum-db/received_events","type":"Organization","site_admin":false},"repo":{"id":44781140,"node_id":"MDEwOlJlcG9zaXRvcnk0NDc4MTE0MA==","name":"gpdb","full_name":"greenplum-db/gpdb","private":false,"owner":{"login":"greenplum-db","id":14097842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDk3ODQy","avatar_url":"https://avatars2.githubusercontent.com/u/14097842?v=4","gravatar_id":"","url":"https://api.github.com/users/greenplum-db","html_url":"https://github.com/greenplum-db","followers_url":"https://api.github.com/users/greenplum-db/followers","following_url":"https://api.github.com/users/greenplum-db/following{/other_user}","gists_url":"https://api.github.com/users/greenplum-db/gists{/gist_id}","starred_url":"https://api.github.com/users/greenplum-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenplum-db/subscriptions","organizations_url":"https://api.github.com/users/greenplum-db/orgs","repos_url":"https://api.github.com/users/greenplum-db/repos","events_url":"https://api.github.com/users/greenplum-db/events{/privacy}","received_events_url":"https://api.github.com/users/greenplum-db/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/greenplum-db/gpdb","description":"Greenplum Database","fork":false,"url":"https://api.github.com/repos/greenplum-db/gpdb","forks_url":"https://api.github.com/repos/greenplum-db/gpdb/forks","keys_url":"https://api.github.com/repos/greenplum-db/gpdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greenplum-db/gpdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greenplum-db/gpdb/teams","hooks_url":"https://api.github.com/repos/greenplum-db/gpdb/hooks","issue_events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/events{/number}","events_url":"https://api.github.com/repos/greenplum-db/gpdb/events","assignees_url":"https://api.github.com/repos/greenplum-db/gpdb/assignees{/user}","branches_url":"https://api.github.com/repos/greenplum-db/gpdb/branches{/branch}","tags_url":"https://api.github.com/repos/greenplum-db/gpdb/tags","blobs_url":"https://api.github.com/repos/greenplum-db/gpdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greenplum-db/gpdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greenplum-db/gpdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/greenplum-db/gpdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greenplum-db/gpdb/statuses/{sha}","languages_url":"https://api.github.com/repos/greenplum-db/gpdb/languages","stargazers_url":"https://api.github.com/repos/greenplum-db/gpdb/stargazers","contributors_url":"https://api.github.com/repos/greenplum-db/gpdb/contributors","subscribers_url":"https://api.github.com/repos/greenplum-db/gpdb/subscribers","subscription_url":"https://api.github.com/repos/greenplum-db/gpdb/subscription","commits_url":"https://api.github.com/repos/greenplum-db/gpdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/greenplum-db/gpdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/greenplum-db/gpdb/contents/{+path}","compare_url":"https://api.github.com/repos/greenplum-db/gpdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greenplum-db/gpdb/merges","archive_url":"https://api.github.com/repos/greenplum-db/gpdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greenplum-db/gpdb/downloads","issues_url":"https://api.github.com/repos/greenplum-db/gpdb/issues{/number}","pulls_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls{/number}","milestones_url":"https://api.github.com/repos/greenplum-db/gpdb/milestones{/number}","notifications_url":"https://api.github.com/repos/greenplum-db/gpdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/labels{/name}","releases_url":"https://api.github.com/repos/greenplum-db/gpdb/releases{/id}","deployments_url":"https://api.github.com/repos/greenplum-db/gpdb/deployments","created_at":"2015-10-23T00:25:17Z","updated_at":"2018-12-13T05:17:02Z","pushed_at":"2018-12-13T08:26:34Z","git_url":"git://github.com/greenplum-db/gpdb.git","ssh_url":"git@github.com:greenplum-db/gpdb.git","clone_url":"https://github.com/greenplum-db/gpdb.git","svn_url":"https://github.com/greenplum-db/gpdb","homepage":"http://greenplum.org","size":333617,"stargazers_count":2842,"watchers_count":2842,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":865,"mirror_url":null,"archived":false,"open_issues_count":282,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":865,"open_issues":282,"watchers":2842,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/6484"},"html":{"href":"https://github.com/greenplum-db/gpdb/pull/6484"},"issue":{"href":"https://api.github.com/repos/greenplum-db/gpdb/issues/6484"},"comments":{"href":"https://api.github.com/repos/greenplum-db/gpdb/issues/6484/comments"},"review_comments":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/6484/comments"},"review_comment":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/6484/commits"},"statuses":{"href":"https://api.github.com/repos/greenplum-db/gpdb/statuses/bea94d1ed683fec5cc98628a5758d47667ffefb1"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":298,"deletions":129,"changed_files":3}}
{"actor":{"display_login":"zhangjackey"}}