{"action":"created","issue":{"url":"https://api.github.com/repos/reorg/pg_repack/issues/117","repository_url":"https://api.github.com/repos/reorg/pg_repack","labels_url":"https://api.github.com/repos/reorg/pg_repack/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/reorg/pg_repack/issues/117/comments","events_url":"https://api.github.com/repos/reorg/pg_repack/issues/117/events","html_url":"https://github.com/reorg/pg_repack/pull/117","id":216049651,"number":117,"title":"Support table inheritance","user":{"login":"funbringer","id":3599598,"avatar_url":"https://avatars3.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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-03-22T12:46:32Z","updated_at":"2017-04-19T11:19:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/reorg/pg_repack/pulls/117","html_url":"https://github.com/reorg/pg_repack/pull/117","diff_url":"https://github.com/reorg/pg_repack/pull/117.diff","patch_url":"https://github.com/reorg/pg_repack/pull/117.patch"},"body":"Hi again,\r\n\r\nI'd like to introduce a new option: **--parent-table** (**-I**). It'd be useful if we had to repack both partitioned table and its partitions (table inheritance, pg_pathman, pg_partman etc). Child tables are fetched using the new function `repack.get_table_and_inheritors(regclass)`.\r\n\r\nI've changed functions `repack_one_database()` and `repack_all_indexes()` in order to achieve the desired behavior:\r\n\r\n```bash\r\n# example 1\r\n./bin/pg_repack -Itest_hash debug\r\nINFO: repacking table \"test_hash\"\r\nINFO: repacking table \"test_hash_0\"\r\nINFO: repacking table \"test_hash_1\"\r\nINFO: repacking table \"test_hash_2\"\r\nINFO: repacking table \"test_hash_3\"\r\n\r\n# example 2\r\n./bin/pg_repack -Itest_hash debug -x\r\nINFO: repacking indexes of \"public.test_hash\"\r\nINFO: repacking index \"public\".\"test_hash_val_idx\"\r\nINFO: repacking indexes of \"public.test_hash_0\"\r\nINFO: repacking index \"public\".\"test_hash_0_val_idx\"\r\nINFO: repacking indexes of \"public.test_hash_1\"\r\nINFO: repacking index \"public\".\"test_hash_1_val_idx\"\r\nINFO: repacking indexes of \"public.test_hash_2\"\r\nINFO: repacking index \"public\".\"test_hash_2_val_idx\"\r\nINFO: repacking indexes of \"public.test_hash_3\"\r\nINFO: repacking index \"public\".\"test_hash_3_val_idx\"\r\n\r\n# example 3\r\n./bin/pg_repack -Itest_hash -Itest_range --all debug\r\nERROR: cannot repack specific table(s) in all databases\r\n```\r\n\r\nFeedback is very welcome!\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/reorg/pg_repack/issues/comments/295225509","html_url":"https://github.com/reorg/pg_repack/pull/117#issuecomment-295225509","issue_url":"https://api.github.com/repos/reorg/pg_repack/issues/117","id":295225509,"user":{"login":"funbringer","id":3599598,"avatar_url":"https://avatars3.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":"2017-04-19T11:19:38Z","updated_at":"2017-04-19T11:19:38Z","body":"to @dvarrazzo, @MasahikoSawada:\r\n\r\nI've resolved all conflicts just in case."}}
{"actor":{"display_login":"funbringer"}}