{"action":"created","issue":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1291","repository_url":"https://api.github.com/repos/greenplum-db/gpdb","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1291/labels{/name}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1291/comments","events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1291/events","html_url":"https://github.com/greenplum-db/gpdb/pull/1291","id":188001941,"number":1291,"title":"Fix relfilenode conflicts.","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,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-08T14:13:44Z","updated_at":"2016-11-08T19:44:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/1291","html_url":"https://github.com/greenplum-db/gpdb/pull/1291","diff_url":"https://github.com/greenplum-db/gpdb/pull/1291.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/1291.patch"},"body":"There was a race condition in the way relfilenodes were chosen, because\r\nQE nodes chose relfilenodes for existing relations, e.g. at REINDEX or\r\nTRUNCATE, independently of the master, while for newly created tables,\r\nthe relfilenode was chosen by the master. To fix:\r\n\r\n1. If the OID of a newly-created table is already in use as relfilenode\r\n   of a different table in a QE segment, use a different relfilenode.\r\n   (This shouldn't happen in the dispatcher, for the same reasons it\r\n   cannot happen in a single-server PostgreSQL instance)\r\n\r\n2. Use a small cache of values recently used for a relfilenode, to close\r\n   a race condition between checking if a relfilenode is in use, and\r\n   actually creating the file"},"comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments/259238651","html_url":"https://github.com/greenplum-db/gpdb/pull/1291#issuecomment-259238651","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1291","id":259238651,"user":{"login":"amilkh","id":1530494,"avatar_url":"https://avatars.githubusercontent.com/u/1530494?v=3","gravatar_id":"","url":"https://api.github.com/users/amilkh","html_url":"https://github.com/amilkh","followers_url":"https://api.github.com/users/amilkh/followers","following_url":"https://api.github.com/users/amilkh/following{/other_user}","gists_url":"https://api.github.com/users/amilkh/gists{/gist_id}","starred_url":"https://api.github.com/users/amilkh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amilkh/subscriptions","organizations_url":"https://api.github.com/users/amilkh/orgs","repos_url":"https://api.github.com/users/amilkh/repos","events_url":"https://api.github.com/users/amilkh/events{/privacy}","received_events_url":"https://api.github.com/users/amilkh/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T19:44:04Z","updated_at":"2016-11-08T19:44:04Z","body":"+1 looks good.\r\n\r\n> There was a race condition in the way relfilenodes were chosen\r\nWhen/how did you encounter this? It may help @asimrp and I with another issue.\r\n\r\nAlso, since these are pretty big changes, shall we run the TINC tests?\r\nhttps://gpdb.ci.pivotalci.info/teams/gpdb/pipelines/gpdb_master_tinc_native"}}
{"actor":{"display_login":"amilkh"}}