{"action":"created","comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments/210813182","pull_request_review_id":147107874,"id":210813182,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDgxMzE4Mg==","diff_hunk":"@@ -916,10 +916,15 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,\n \t * paranoia.  We also reset the usage_count since any recency of use of\n \t * the old content is no longer relevant.  (The usage_count starts out at\n \t * 1 so that the buffer can survive one clock-sweep pass.)\n+\t *\n+\t * Make sure BM_PERMANENT is set for buffers that must be written at every\n+\t * checkpoint.  Unlogged buffers only need to be written at shutdown\n+\t * checkpoints, except for their \"init\" forks, which need to be treated\n+\t * just like permanent relations.\n \t */\n \tbuf->tag = newTag;\n \tbuf->flags &= ~(BM_VALID | BM_DIRTY | BM_JUST_DIRTIED | BM_CHECKPOINT_NEEDED | BM_IO_ERROR | BM_PERMANENT | BM_TEMP);\n-\tif (relpersistence == RELPERSISTENCE_PERMANENT)\n+\tif (relpersistence == RELPERSISTENCE_PERMANENT || forkNum == INIT_FORKNUM)","path":"src/backend/storage/buffer/bufmgr.c","position":13,"original_position":13,"commit_id":"eb4a397f6fad79d4230af6e64c5a755913353daf","original_commit_id":"57135d205090362274ce0941f1da6eb322f197c5","user":{"login":"xiong-gang","id":14144434,"node_id":"MDQ6VXNlcjE0MTQ0NDM0","avatar_url":"https://avatars0.githubusercontent.com/u/14144434?v=4","gravatar_id":"","url":"https://api.github.com/users/xiong-gang","html_url":"https://github.com/xiong-gang","followers_url":"https://api.github.com/users/xiong-gang/followers","following_url":"https://api.github.com/users/xiong-gang/following{/other_user}","gists_url":"https://api.github.com/users/xiong-gang/gists{/gist_id}","starred_url":"https://api.github.com/users/xiong-gang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiong-gang/subscriptions","organizations_url":"https://api.github.com/users/xiong-gang/orgs","repos_url":"https://api.github.com/users/xiong-gang/repos","events_url":"https://api.github.com/users/xiong-gang/events{/privacy}","received_events_url":"https://api.github.com/users/xiong-gang/received_events","type":"User","site_admin":false},"body":"Good point Asim. \r\nI double checked, it is safe, `_init` files(INIT_FORKNUM) are created only when it's an unlogged table or unlogged index. Temp table won't set INIT_FORKNUM.","created_at":"2018-08-17T06:12:36Z","updated_at":"2018-08-17T06:12:37Z","html_url":"https://github.com/greenplum-db/gpdb/pull/5509#discussion_r210813182","pull_request_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/5509","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments/210813182"},"html":{"href":"https://github.com/greenplum-db/gpdb/pull/5509#discussion_r210813182"},"pull_request":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/5509"}},"in_reply_to_id":210790451},"pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/5509","id":208791578,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NzkxNTc4","html_url":"https://github.com/greenplum-db/gpdb/pull/5509","diff_url":"https://github.com/greenplum-db/gpdb/pull/5509.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/5509.patch","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/5509","number":5509,"state":"open","locked":false,"title":"Support bitmap index for 'unlogged' table","user":{"login":"xiong-gang","id":14144434,"node_id":"MDQ6VXNlcjE0MTQ0NDM0","avatar_url":"https://avatars0.githubusercontent.com/u/14144434?v=4","gravatar_id":"","url":"https://api.github.com/users/xiong-gang","html_url":"https://github.com/xiong-gang","followers_url":"https://api.github.com/users/xiong-gang/followers","following_url":"https://api.github.com/users/xiong-gang/following{/other_user}","gists_url":"https://api.github.com/users/xiong-gang/gists{/gist_id}","starred_url":"https://api.github.com/users/xiong-gang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiong-gang/subscriptions","organizations_url":"https://api.github.com/users/xiong-gang/orgs","repos_url":"https://api.github.com/users/xiong-gang/repos","events_url":"https://api.github.com/users/xiong-gang/events{/privacy}","received_events_url":"https://api.github.com/users/xiong-gang/received_events","type":"User","site_admin":false},"body":"- Implement bmbuildempty() to support bitmap index for 'unlogged' table\r\n- Cherry-pick 6bd781 \r\n- Fix checksum issue for btree and spg index on 'unlogged' table\r\n\r\nCo-authored-by: Alexandra Wang <lewang@pivotal.io>\r\nCo-authored-by: Gang Xiong <gxiong@pivotal.io>","created_at":"2018-08-16T09:06:17Z","updated_at":"2018-08-17T06:12:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c34833016e29295a17b703ac94fb19484611daed","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/5509/commits","review_comments_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/5509/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/5509/comments","statuses_url":"https://api.github.com/repos/greenplum-db/gpdb/statuses/eb4a397f6fad79d4230af6e64c5a755913353daf","head":{"label":"xiong-gang:bitmap_build_empty","ref":"bitmap_build_empty","sha":"eb4a397f6fad79d4230af6e64c5a755913353daf","user":{"login":"xiong-gang","id":14144434,"node_id":"MDQ6VXNlcjE0MTQ0NDM0","avatar_url":"https://avatars0.githubusercontent.com/u/14144434?v=4","gravatar_id":"","url":"https://api.github.com/users/xiong-gang","html_url":"https://github.com/xiong-gang","followers_url":"https://api.github.com/users/xiong-gang/followers","following_url":"https://api.github.com/users/xiong-gang/following{/other_user}","gists_url":"https://api.github.com/users/xiong-gang/gists{/gist_id}","starred_url":"https://api.github.com/users/xiong-gang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiong-gang/subscriptions","organizations_url":"https://api.github.com/users/xiong-gang/orgs","repos_url":"https://api.github.com/users/xiong-gang/repos","events_url":"https://api.github.com/users/xiong-gang/events{/privacy}","received_events_url":"https://api.github.com/users/xiong-gang/received_events","type":"User","site_admin":false},"repo":{"id":45377728,"node_id":"MDEwOlJlcG9zaXRvcnk0NTM3NzcyOA==","name":"gpdb","full_name":"xiong-gang/gpdb","owner":{"login":"xiong-gang","id":14144434,"node_id":"MDQ6VXNlcjE0MTQ0NDM0","avatar_url":"https://avatars0.githubusercontent.com/u/14144434?v=4","gravatar_id":"","url":"https://api.github.com/users/xiong-gang","html_url":"https://github.com/xiong-gang","followers_url":"https://api.github.com/users/xiong-gang/followers","following_url":"https://api.github.com/users/xiong-gang/following{/other_user}","gists_url":"https://api.github.com/users/xiong-gang/gists{/gist_id}","starred_url":"https://api.github.com/users/xiong-gang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiong-gang/subscriptions","organizations_url":"https://api.github.com/users/xiong-gang/orgs","repos_url":"https://api.github.com/users/xiong-gang/repos","events_url":"https://api.github.com/users/xiong-gang/events{/privacy}","received_events_url":"https://api.github.com/users/xiong-gang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xiong-gang/gpdb","description":"Pivotal Greenplum Database","fork":true,"url":"https://api.github.com/repos/xiong-gang/gpdb","forks_url":"https://api.github.com/repos/xiong-gang/gpdb/forks","keys_url":"https://api.github.com/repos/xiong-gang/gpdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xiong-gang/gpdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xiong-gang/gpdb/teams","hooks_url":"https://api.github.com/repos/xiong-gang/gpdb/hooks","issue_events_url":"https://api.github.com/repos/xiong-gang/gpdb/issues/events{/number}","events_url":"https://api.github.com/repos/xiong-gang/gpdb/events","assignees_url":"https://api.github.com/repos/xiong-gang/gpdb/assignees{/user}","branches_url":"https://api.github.com/repos/xiong-gang/gpdb/branches{/branch}","tags_url":"https://api.github.com/repos/xiong-gang/gpdb/tags","blobs_url":"https://api.github.com/repos/xiong-gang/gpdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xiong-gang/gpdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xiong-gang/gpdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/xiong-gang/gpdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xiong-gang/gpdb/statuses/{sha}","languages_url":"https://api.github.com/repos/xiong-gang/gpdb/languages","stargazers_url":"https://api.github.com/repos/xiong-gang/gpdb/stargazers","contributors_url":"https://api.github.com/repos/xiong-gang/gpdb/contributors","subscribers_url":"https://api.github.com/repos/xiong-gang/gpdb/subscribers","subscription_url":"https://api.github.com/repos/xiong-gang/gpdb/subscription","commits_url":"https://api.github.com/repos/xiong-gang/gpdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/xiong-gang/gpdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/xiong-gang/gpdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/xiong-gang/gpdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/xiong-gang/gpdb/contents/{+path}","compare_url":"https://api.github.com/repos/xiong-gang/gpdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xiong-gang/gpdb/merges","archive_url":"https://api.github.com/repos/xiong-gang/gpdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xiong-gang/gpdb/downloads","issues_url":"https://api.github.com/repos/xiong-gang/gpdb/issues{/number}","pulls_url":"https://api.github.com/repos/xiong-gang/gpdb/pulls{/number}","milestones_url":"https://api.github.com/repos/xiong-gang/gpdb/milestones{/number}","notifications_url":"https://api.github.com/repos/xiong-gang/gpdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xiong-gang/gpdb/labels{/name}","releases_url":"https://api.github.com/repos/xiong-gang/gpdb/releases{/id}","deployments_url":"https://api.github.com/repos/xiong-gang/gpdb/deployments","created_at":"2015-11-02T07:06:01Z","updated_at":"2015-11-02T07:06:47Z","pushed_at":"2018-08-17T02:17:02Z","git_url":"git://github.com/xiong-gang/gpdb.git","ssh_url":"git@github.com:xiong-gang/gpdb.git","clone_url":"https://github.com/xiong-gang/gpdb.git","svn_url":"https://github.com/xiong-gang/gpdb","homepage":"http://greenplum.org","size":290828,"stargazers_count":0,"watchers_count":0,"language":"PLpgSQL","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"greenplum-db:master","ref":"master","sha":"22e553661a723fef6820a9c83922a093ca1d0b82","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","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},"private":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-08-17T01:02:25Z","pushed_at":"2018-08-17T04:12:31Z","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":293860,"stargazers_count":2622,"watchers_count":2622,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":813,"mirror_url":null,"archived":false,"open_issues_count":228,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":813,"open_issues":228,"watchers":2622,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/5509"},"html":{"href":"https://github.com/greenplum-db/gpdb/pull/5509"},"issue":{"href":"https://api.github.com/repos/greenplum-db/gpdb/issues/5509"},"comments":{"href":"https://api.github.com/repos/greenplum-db/gpdb/issues/5509/comments"},"review_comments":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/5509/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/5509/commits"},"statuses":{"href":"https://api.github.com/repos/greenplum-db/gpdb/statuses/eb4a397f6fad79d4230af6e64c5a755913353daf"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"xiong-gang"}}