{"action":"created","comment":{"url":"https://api.github.com/repos/citusdata/citus/pulls/comments/93588924","pull_request_review_id":14118938,"id":93588924,"diff_hunk":"@@ -660,6 +663,19 @@ UpdateRelationColocationGroup(Oid distributedRelationId, uint32 colocationId)\n \n \tsystable_endscan(scanDescriptor);\n \theap_close(pgDistPartition, NoLock);\n+\n+\tshouldSyncMetadata = ShouldSyncTableMetadata(distributedRelationId);\n+\tif (shouldSyncMetadata)\n+\t{\n+\t\tStringInfo command = makeStringInfo();\n+\t\tchar *relationName = get_rel_name(distributedRelationId);\n+\t\tappendStringInfo(command, \"UPDATE pg_dist_partition \"\n+\t\t\t\t\t\t\t\t  \"SET colocationid='%d' \"\n+\t\t\t\t\t\t\t\t  \"WHERE logicalrelid='%s'::regclass\",","path":"src/backend/distributed/utils/colocation_utils.c","position":null,"original_position":34,"commit_id":"7a9ee3cfd87f7e5bc21990b507d804bc5480c1ab","original_commit_id":"a0cffc0d6e17c8d177099bb5467607c531e6fc5e","user":{"login":"aamederen","id":1406797,"avatar_url":"https://avatars.githubusercontent.com/u/1406797?v=3","gravatar_id":"","url":"https://api.github.com/users/aamederen","html_url":"https://github.com/aamederen","followers_url":"https://api.github.com/users/aamederen/followers","following_url":"https://api.github.com/users/aamederen/following{/other_user}","gists_url":"https://api.github.com/users/aamederen/gists{/gist_id}","starred_url":"https://api.github.com/users/aamederen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aamederen/subscriptions","organizations_url":"https://api.github.com/users/aamederen/orgs","repos_url":"https://api.github.com/users/aamederen/repos","events_url":"https://api.github.com/users/aamederen/events{/privacy}","received_events_url":"https://api.github.com/users/aamederen/received_events","type":"User","site_admin":false},"body":"I have tried to change this by looking into how they are done in other functions of `metadata_sync.c`\r\n","created_at":"2016-12-22T09:21:11Z","updated_at":"2016-12-22T09:21:11Z","html_url":"https://github.com/citusdata/citus/pull/1045#discussion_r93588924","pull_request_url":"https://api.github.com/repos/citusdata/citus/pulls/1045","_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments/93588924"},"html":{"href":"https://github.com/citusdata/citus/pull/1045#discussion_r93588924"},"pull_request":{"href":"https://api.github.com/repos/citusdata/citus/pulls/1045"}}},"pull_request":{"url":"https://api.github.com/repos/citusdata/citus/pulls/1045","id":98129882,"html_url":"https://github.com/citusdata/citus/pull/1045","diff_url":"https://github.com/citusdata/citus/pull/1045.diff","patch_url":"https://github.com/citusdata/citus/pull/1045.patch","issue_url":"https://api.github.com/repos/citusdata/citus/issues/1045","number":1045,"state":"open","locked":false,"title":"Propagate MX Metadata Changes","user":{"login":"aamederen","id":1406797,"avatar_url":"https://avatars.githubusercontent.com/u/1406797?v=3","gravatar_id":"","url":"https://api.github.com/users/aamederen","html_url":"https://github.com/aamederen","followers_url":"https://api.github.com/users/aamederen/followers","following_url":"https://api.github.com/users/aamederen/following{/other_user}","gists_url":"https://api.github.com/users/aamederen/gists{/gist_id}","starred_url":"https://api.github.com/users/aamederen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aamederen/subscriptions","organizations_url":"https://api.github.com/users/aamederen/orgs","repos_url":"https://api.github.com/users/aamederen/repos","events_url":"https://api.github.com/users/aamederen/events{/privacy}","received_events_url":"https://api.github.com/users/aamederen/received_events","type":"User","site_admin":false},"body":"This change adds support for creating and maintaining MX tables by providing proper metadata propagation to workers during `create_distributed_table`, `DROP TABLE`, DDLs and other metadata changing commands.\r\n\r\nFixes #791 \r\n\r\nRemaining Work:\r\n- [x] Automatically mark hash distributed tables with RF=1 with `repmodel=s`\r\n- [x] Propagate mx table and shard metadata in `create_distributed_table`\r\n- [x] Propagate DDL changes (including Foreign Keys)\r\n- [x] Propagate `mark_tables_colocated` changes\r\n- [x] Handle `DROP TABLE`\r\n","created_at":"2016-12-15T11:08:39Z","updated_at":"2016-12-22T09:21:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5dcb7b7351c9d98e51a8355bf0072fd486a6f4d6","assignee":{"login":"marcocitus","id":7127240,"avatar_url":"https://avatars.githubusercontent.com/u/7127240?v=3","gravatar_id":"","url":"https://api.github.com/users/marcocitus","html_url":"https://github.com/marcocitus","followers_url":"https://api.github.com/users/marcocitus/followers","following_url":"https://api.github.com/users/marcocitus/following{/other_user}","gists_url":"https://api.github.com/users/marcocitus/gists{/gist_id}","starred_url":"https://api.github.com/users/marcocitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcocitus/subscriptions","organizations_url":"https://api.github.com/users/marcocitus/orgs","repos_url":"https://api.github.com/users/marcocitus/repos","events_url":"https://api.github.com/users/marcocitus/events{/privacy}","received_events_url":"https://api.github.com/users/marcocitus/received_events","type":"User","site_admin":false},"assignees":[{"login":"marcocitus","id":7127240,"avatar_url":"https://avatars.githubusercontent.com/u/7127240?v=3","gravatar_id":"","url":"https://api.github.com/users/marcocitus","html_url":"https://github.com/marcocitus","followers_url":"https://api.github.com/users/marcocitus/followers","following_url":"https://api.github.com/users/marcocitus/following{/other_user}","gists_url":"https://api.github.com/users/marcocitus/gists{/gist_id}","starred_url":"https://api.github.com/users/marcocitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcocitus/subscriptions","organizations_url":"https://api.github.com/users/marcocitus/orgs","repos_url":"https://api.github.com/users/marcocitus/repos","events_url":"https://api.github.com/users/marcocitus/events{/privacy}","received_events_url":"https://api.github.com/users/marcocitus/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/citusdata/citus/pulls/1045/commits","review_comments_url":"https://api.github.com/repos/citusdata/citus/pulls/1045/comments","review_comment_url":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citusdata/citus/issues/1045/comments","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/7a9ee3cfd87f7e5bc21990b507d804bc5480c1ab","head":{"label":"citusdata:propagate_mx_metadata_changes","ref":"propagate_mx_metadata_changes","sha":"7a9ee3cfd87f7e5bc21990b507d804bc5480c1ab","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2016-12-22T08:48:08Z","pushed_at":"2016-12-22T09:19:38Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":4288,"stargazers_count":1764,"watchers_count":1764,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":435,"forks":119,"open_issues":435,"watchers":1764,"default_branch":"master"}},"base":{"label":"citusdata:master","ref":"master","sha":"501a2ecead3974685a58591dc34b0e46722aa6f7","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2016-12-22T08:48:08Z","pushed_at":"2016-12-22T09:19:38Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":4288,"stargazers_count":1764,"watchers_count":1764,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":435,"forks":119,"open_issues":435,"watchers":1764,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/1045"},"html":{"href":"https://github.com/citusdata/citus/pull/1045"},"issue":{"href":"https://api.github.com/repos/citusdata/citus/issues/1045"},"comments":{"href":"https://api.github.com/repos/citusdata/citus/issues/1045/comments"},"review_comments":{"href":"https://api.github.com/repos/citusdata/citus/pulls/1045/comments"},"review_comment":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citusdata/citus/pulls/1045/commits"},"statuses":{"href":"https://api.github.com/repos/citusdata/citus/statuses/7a9ee3cfd87f7e5bc21990b507d804bc5480c1ab"}}}}
{"actor":{"display_login":"aamederen"}}