{"action":"created","issue":{"url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/44","repository_url":"https://api.github.com/repos/postgrespro/pg_pathman","labels_url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/44/comments","events_url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/44/events","html_url":"https://github.com/postgrespro/pg_pathman/issues/44","id":184546028,"number":44,"title":"Unable to spawn new partitions on insertion","user":{"login":"IVolzhev","id":22986676,"avatar_url":"https://avatars.githubusercontent.com/u/22986676?v=3","gravatar_id":"","url":"https://api.github.com/users/IVolzhev","html_url":"https://github.com/IVolzhev","followers_url":"https://api.github.com/users/IVolzhev/followers","following_url":"https://api.github.com/users/IVolzhev/following{/other_user}","gists_url":"https://api.github.com/users/IVolzhev/gists{/gist_id}","starred_url":"https://api.github.com/users/IVolzhev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IVolzhev/subscriptions","organizations_url":"https://api.github.com/users/IVolzhev/orgs","repos_url":"https://api.github.com/users/IVolzhev/repos","events_url":"https://api.github.com/users/IVolzhev/events{/privacy}","received_events_url":"https://api.github.com/users/IVolzhev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/postgrespro/pg_pathman/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-21T18:54:43Z","updated_at":"2016-10-25T16:08:44Z","closed_at":null,"body":"When table owner set to non-default role, creating a new partition terminates with error. Please see test script below:\r\n\r\n```\r\ndrop role if exists oimc_owner;\r\ndrop table if exists raw_flows cascade; \r\n\r\ncreate role oimc_owner nologin nosuperuser;\r\n\r\n--\r\n--\r\ncreate table if not exists raw_flows(\r\n  rawf_begin_connection_time      timestamp not null,\r\n  rawf_client_address             inet not null\r\n)\r\nwith (oids = false);\r\n--\r\nalter table raw_flows owner to oimc_owner;\r\n--\r\nselect\r\ncreate_range_partitions(\r\n  'raw_flows',\r\n  'rawf_begin_connection_time',\r\n  date_trunc('day', localtimestamp)::timestamp,\r\n  '1 day'::interval,\r\n  1\r\n);\r\n\r\ninsert into raw_flows values (now()::timestamp, '127.0.0.1');\r\ninsert into raw_flows values (now()::timestamp + interval '1 day', '127.0.0.1');\r\n```\r\nThis script causes error:\r\n```\r\nERROR:  Attempt to spawn new partitions of relation \"raw_flows\" failed\r\nHINT:  See server log for more details.\r\n```\r\n\r\nIf the `alter table raw_flows owner to oimc_owner` statement is removed, all works perfectly."},"comment":{"url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/comments/256081433","html_url":"https://github.com/postgrespro/pg_pathman/issues/44#issuecomment-256081433","issue_url":"https://api.github.com/repos/postgrespro/pg_pathman/issues/44","id":256081433,"user":{"login":"funbringer","id":3599598,"avatar_url":"https://avatars.githubusercontent.com/u/3599598?v=3","gravatar_id":"","url":"https://api.github.com/users/funbringer","html_url":"https://github.com/funbringer","followers_url":"https://api.github.com/users/funbringer/followers","following_url":"https://api.github.com/users/funbringer/following{/other_user}","gists_url":"https://api.github.com/users/funbringer/gists{/gist_id}","starred_url":"https://api.github.com/users/funbringer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funbringer/subscriptions","organizations_url":"https://api.github.com/users/funbringer/orgs","repos_url":"https://api.github.com/users/funbringer/repos","events_url":"https://api.github.com/users/funbringer/events{/privacy}","received_events_url":"https://api.github.com/users/funbringer/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T16:08:44Z","updated_at":"2016-10-25T16:08:44Z","body":"> Is it really required to grant superuser privilege?\r\n\r\nNo, it's not supposed to require su privileges. However, are you sure it's the same error? Don't forget that you should also grant INSERT to the user that is going to insert new rows."}}
{"actor":{"display_login":"funbringer"}}