{"action":"created","comment":{"url":"https://api.github.com/repos/timescale/timescaledb/pulls/comments/239934431","pull_request_review_id":182857997,"id":239934431,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTkzNDQzMQ==","diff_hunk":"@@ -378,6 +393,74 @@ process_vacuum(Node *parsetree, ProcessUtilityContext context)\n \n \treturn true;\n }\n+#else\n+typedef struct VacuumCtx\n+{\n+\tVacuumRelation *ht_vacuum_rel;\n+\tList\t   *chunk_rels;\n+} VacuumCtx;\n+\n+/* Adds a chunk to the list of tables to be vacuumed */\n+static void\n+add_chunk_to_vacuum(Hypertable *ht, Oid chunk_relid, void *arg)\n+{\n+\tVacuumCtx  *ctx = (VacuumCtx *) arg;\n+\tChunk\t   *chunk = ts_chunk_get_by_relid(chunk_relid, ht->space->num_dimensions, true);\n+\tVacuumRelation *chunk_vacuum_rel;\n+\tRangeVar   *chunk_range_var = copyObject(ctx->ht_vacuum_rel->relation);\n+\n+\tchunk_range_var->relname = NameStr(chunk->fd.table_name);\n+\tchunk_range_var->schemaname = NameStr(chunk->fd.schema_name);\n+\tchunk_vacuum_rel = makeVacuumRelation(chunk_range_var, chunk_relid, ctx->ht_vacuum_rel->va_cols);\n+\n+\tctx->chunk_rels = lappend(ctx->chunk_rels, chunk_vacuum_rel);\n+}\n+\n+/* Vacuums a hypertable and all of it's chunks */\n+static bool\n+process_vacuum(Node *parsetree, ProcessUtilityContext context)\n+{\n+\tVacuumStmt *stmt = (VacuumStmt *) parsetree;\n+\tbool\t\tis_toplevel = (context == PROCESS_UTILITY_TOPLEVEL);\n+\tVacuumCtx\tctx = {\n+\t\t.ht_vacuum_rel = NULL,\n+\t\t.chunk_rels = NIL,\n+\t};\n+\tListCell   *lc;\n+\tOid\t\t\thypertable_oid;\n+\tCache\t   *hcache;\n+\tHypertable *ht;\n+\tbool\t\taffects_hypertable = false;\n+\n+\tif (stmt->rels == NIL)\n+\t\t/* Vacuum is for all tables */\n+\t\treturn false;\n+\n+\thcache = ts_hypertable_cache_pin();\n+\tforeach(lc, stmt->rels)\n+\t{\n+\t\tVacuumRelation *vacuum_rel = lfirst_node(VacuumRelation, lc);\n+\n+\t\thypertable_oid = ts_hypertable_relid(vacuum_rel->relation);","path":"src/process_utility.c","position":142,"original_position":142,"commit_id":"02a013e694e28744111330411583970b46f82372","original_commit_id":"02a013e694e28744111330411583970b46f82372","user":{"login":"cevian","id":112245,"node_id":"MDQ6VXNlcjExMjI0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/112245?v=4","gravatar_id":"","url":"https://api.github.com/users/cevian","html_url":"https://github.com/cevian","followers_url":"https://api.github.com/users/cevian/followers","following_url":"https://api.github.com/users/cevian/following{/other_user}","gists_url":"https://api.github.com/users/cevian/gists{/gist_id}","starred_url":"https://api.github.com/users/cevian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cevian/subscriptions","organizations_url":"https://api.github.com/users/cevian/orgs","repos_url":"https://api.github.com/users/cevian/repos","events_url":"https://api.github.com/users/cevian/events{/privacy}","received_events_url":"https://api.github.com/users/cevian/received_events","type":"User","site_admin":false},"body":"a bit weird to use `ts_hypertable_relid` before using `ts_hypertable_cache_get_entry` I would use `ts_hypertable_cache_get_entry` passing it the relid from `RangeVarGetRelid(vacuum_rel->relation, NoLock, true)`","created_at":"2018-12-07T20:17:54Z","updated_at":"2018-12-07T20:17:54Z","html_url":"https://github.com/timescale/timescaledb/pull/876#discussion_r239934431","pull_request_url":"https://api.github.com/repos/timescale/timescaledb/pulls/876","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/timescale/timescaledb/pulls/comments/239934431"},"html":{"href":"https://github.com/timescale/timescaledb/pull/876#discussion_r239934431"},"pull_request":{"href":"https://api.github.com/repos/timescale/timescaledb/pulls/876"}}},"pull_request":{"url":"https://api.github.com/repos/timescale/timescaledb/pulls/876","id":235344448,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MzQ0NDQ4","html_url":"https://github.com/timescale/timescaledb/pull/876","diff_url":"https://github.com/timescale/timescaledb/pull/876.diff","patch_url":"https://github.com/timescale/timescaledb/pull/876.patch","issue_url":"https://api.github.com/repos/timescale/timescaledb/issues/876","number":876,"state":"open","locked":false,"title":"Refactor compatibility functions and code to support PG11","user":{"login":"davidkohn88","id":35269003,"node_id":"MDQ6VXNlcjM1MjY5MDAz","avatar_url":"https://avatars2.githubusercontent.com/u/35269003?v=4","gravatar_id":"","url":"https://api.github.com/users/davidkohn88","html_url":"https://github.com/davidkohn88","followers_url":"https://api.github.com/users/davidkohn88/followers","following_url":"https://api.github.com/users/davidkohn88/following{/other_user}","gists_url":"https://api.github.com/users/davidkohn88/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkohn88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkohn88/subscriptions","organizations_url":"https://api.github.com/users/davidkohn88/orgs","repos_url":"https://api.github.com/users/davidkohn88/repos","events_url":"https://api.github.com/users/davidkohn88/events{/privacy}","received_events_url":"https://api.github.com/users/davidkohn88/received_events","type":"User","site_admin":false},"body":"Introduce PG11 support by introducing compatibility functions for\r\nany whose signatures have changed in PG11. Additionally, refactor\r\nthe structure of the compatibility functions found in compat.h by\r\nbreaking them out by function (or small set of similar functions)\r\nso that it is easier to see what changed between versions and maintain\r\nchanges as more versions are supported.\r\nThanks to contributer Didier (@did-g) as many of the changes\r\ninvolving TupleDescAttr were ported into this commit from his original\r\nPR.","created_at":"2018-12-03T06:58:50Z","updated_at":"2018-12-07T20:17:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c76aaff30e131fe96e1bbcd116e48aaa9dbc08ac","assignee":{"login":"davidkohn88","id":35269003,"node_id":"MDQ6VXNlcjM1MjY5MDAz","avatar_url":"https://avatars2.githubusercontent.com/u/35269003?v=4","gravatar_id":"","url":"https://api.github.com/users/davidkohn88","html_url":"https://github.com/davidkohn88","followers_url":"https://api.github.com/users/davidkohn88/followers","following_url":"https://api.github.com/users/davidkohn88/following{/other_user}","gists_url":"https://api.github.com/users/davidkohn88/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkohn88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkohn88/subscriptions","organizations_url":"https://api.github.com/users/davidkohn88/orgs","repos_url":"https://api.github.com/users/davidkohn88/repos","events_url":"https://api.github.com/users/davidkohn88/events{/privacy}","received_events_url":"https://api.github.com/users/davidkohn88/received_events","type":"User","site_admin":false},"assignees":[{"login":"davidkohn88","id":35269003,"node_id":"MDQ6VXNlcjM1MjY5MDAz","avatar_url":"https://avatars2.githubusercontent.com/u/35269003?v=4","gravatar_id":"","url":"https://api.github.com/users/davidkohn88","html_url":"https://github.com/davidkohn88","followers_url":"https://api.github.com/users/davidkohn88/followers","following_url":"https://api.github.com/users/davidkohn88/following{/other_user}","gists_url":"https://api.github.com/users/davidkohn88/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkohn88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkohn88/subscriptions","organizations_url":"https://api.github.com/users/davidkohn88/orgs","repos_url":"https://api.github.com/users/davidkohn88/repos","events_url":"https://api.github.com/users/davidkohn88/events{/privacy}","received_events_url":"https://api.github.com/users/davidkohn88/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/timescale/timescaledb/pulls/876/commits","review_comments_url":"https://api.github.com/repos/timescale/timescaledb/pulls/876/comments","review_comment_url":"https://api.github.com/repos/timescale/timescaledb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/timescale/timescaledb/issues/876/comments","statuses_url":"https://api.github.com/repos/timescale/timescaledb/statuses/02a013e694e28744111330411583970b46f82372","head":{"label":"davidkohn88:pg-11-compat","ref":"pg-11-compat","sha":"02a013e694e28744111330411583970b46f82372","user":{"login":"davidkohn88","id":35269003,"node_id":"MDQ6VXNlcjM1MjY5MDAz","avatar_url":"https://avatars2.githubusercontent.com/u/35269003?v=4","gravatar_id":"","url":"https://api.github.com/users/davidkohn88","html_url":"https://github.com/davidkohn88","followers_url":"https://api.github.com/users/davidkohn88/followers","following_url":"https://api.github.com/users/davidkohn88/following{/other_user}","gists_url":"https://api.github.com/users/davidkohn88/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkohn88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkohn88/subscriptions","organizations_url":"https://api.github.com/users/davidkohn88/orgs","repos_url":"https://api.github.com/users/davidkohn88/repos","events_url":"https://api.github.com/users/davidkohn88/events{/privacy}","received_events_url":"https://api.github.com/users/davidkohn88/received_events","type":"User","site_admin":false},"repo":{"id":126227773,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYyMjc3NzM=","name":"timescaledb","full_name":"davidkohn88/timescaledb","private":false,"owner":{"login":"davidkohn88","id":35269003,"node_id":"MDQ6VXNlcjM1MjY5MDAz","avatar_url":"https://avatars2.githubusercontent.com/u/35269003?v=4","gravatar_id":"","url":"https://api.github.com/users/davidkohn88","html_url":"https://github.com/davidkohn88","followers_url":"https://api.github.com/users/davidkohn88/followers","following_url":"https://api.github.com/users/davidkohn88/following{/other_user}","gists_url":"https://api.github.com/users/davidkohn88/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkohn88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkohn88/subscriptions","organizations_url":"https://api.github.com/users/davidkohn88/orgs","repos_url":"https://api.github.com/users/davidkohn88/repos","events_url":"https://api.github.com/users/davidkohn88/events{/privacy}","received_events_url":"https://api.github.com/users/davidkohn88/received_events","type":"User","site_admin":false},"html_url":"https://github.com/davidkohn88/timescaledb","description":"An open-source time-series database optimized for fast ingest and complex queries.  Engineered up from PostgreSQL, packaged as an extension.","fork":true,"url":"https://api.github.com/repos/davidkohn88/timescaledb","forks_url":"https://api.github.com/repos/davidkohn88/timescaledb/forks","keys_url":"https://api.github.com/repos/davidkohn88/timescaledb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidkohn88/timescaledb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidkohn88/timescaledb/teams","hooks_url":"https://api.github.com/repos/davidkohn88/timescaledb/hooks","issue_events_url":"https://api.github.com/repos/davidkohn88/timescaledb/issues/events{/number}","events_url":"https://api.github.com/repos/davidkohn88/timescaledb/events","assignees_url":"https://api.github.com/repos/davidkohn88/timescaledb/assignees{/user}","branches_url":"https://api.github.com/repos/davidkohn88/timescaledb/branches{/branch}","tags_url":"https://api.github.com/repos/davidkohn88/timescaledb/tags","blobs_url":"https://api.github.com/repos/davidkohn88/timescaledb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidkohn88/timescaledb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidkohn88/timescaledb/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidkohn88/timescaledb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidkohn88/timescaledb/statuses/{sha}","languages_url":"https://api.github.com/repos/davidkohn88/timescaledb/languages","stargazers_url":"https://api.github.com/repos/davidkohn88/timescaledb/stargazers","contributors_url":"https://api.github.com/repos/davidkohn88/timescaledb/contributors","subscribers_url":"https://api.github.com/repos/davidkohn88/timescaledb/subscribers","subscription_url":"https://api.github.com/repos/davidkohn88/timescaledb/subscription","commits_url":"https://api.github.com/repos/davidkohn88/timescaledb/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidkohn88/timescaledb/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidkohn88/timescaledb/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidkohn88/timescaledb/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidkohn88/timescaledb/contents/{+path}","compare_url":"https://api.github.com/repos/davidkohn88/timescaledb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidkohn88/timescaledb/merges","archive_url":"https://api.github.com/repos/davidkohn88/timescaledb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidkohn88/timescaledb/downloads","issues_url":"https://api.github.com/repos/davidkohn88/timescaledb/issues{/number}","pulls_url":"https://api.github.com/repos/davidkohn88/timescaledb/pulls{/number}","milestones_url":"https://api.github.com/repos/davidkohn88/timescaledb/milestones{/number}","notifications_url":"https://api.github.com/repos/davidkohn88/timescaledb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidkohn88/timescaledb/labels{/name}","releases_url":"https://api.github.com/repos/davidkohn88/timescaledb/releases{/id}","deployments_url":"https://api.github.com/repos/davidkohn88/timescaledb/deployments","created_at":"2018-03-21T19:06:12Z","updated_at":"2018-12-02T22:00:30Z","pushed_at":"2018-12-07T19:34:02Z","git_url":"git://github.com/davidkohn88/timescaledb.git","ssh_url":"git@github.com:davidkohn88/timescaledb.git","clone_url":"https://github.com/davidkohn88/timescaledb.git","svn_url":"https://github.com/davidkohn88/timescaledb","homepage":"http://www.timescale.com/","size":4230,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"timescale:master","ref":"master","sha":"74eb04596b815379d33db62ef15ff289589b01b1","user":{"login":"timescale","id":8986001,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5ODYwMDE=","avatar_url":"https://avatars3.githubusercontent.com/u/8986001?v=4","gravatar_id":"","url":"https://api.github.com/users/timescale","html_url":"https://github.com/timescale","followers_url":"https://api.github.com/users/timescale/followers","following_url":"https://api.github.com/users/timescale/following{/other_user}","gists_url":"https://api.github.com/users/timescale/gists{/gist_id}","starred_url":"https://api.github.com/users/timescale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timescale/subscriptions","organizations_url":"https://api.github.com/users/timescale/orgs","repos_url":"https://api.github.com/users/timescale/repos","events_url":"https://api.github.com/users/timescale/events{/privacy}","received_events_url":"https://api.github.com/users/timescale/received_events","type":"Organization","site_admin":false},"repo":{"id":84240850,"node_id":"MDEwOlJlcG9zaXRvcnk4NDI0MDg1MA==","name":"timescaledb","full_name":"timescale/timescaledb","private":false,"owner":{"login":"timescale","id":8986001,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5ODYwMDE=","avatar_url":"https://avatars3.githubusercontent.com/u/8986001?v=4","gravatar_id":"","url":"https://api.github.com/users/timescale","html_url":"https://github.com/timescale","followers_url":"https://api.github.com/users/timescale/followers","following_url":"https://api.github.com/users/timescale/following{/other_user}","gists_url":"https://api.github.com/users/timescale/gists{/gist_id}","starred_url":"https://api.github.com/users/timescale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timescale/subscriptions","organizations_url":"https://api.github.com/users/timescale/orgs","repos_url":"https://api.github.com/users/timescale/repos","events_url":"https://api.github.com/users/timescale/events{/privacy}","received_events_url":"https://api.github.com/users/timescale/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/timescale/timescaledb","description":"An open-source time-series database optimized for fast ingest and complex queries.  Engineered up from PostgreSQL, packaged as an extension.","fork":false,"url":"https://api.github.com/repos/timescale/timescaledb","forks_url":"https://api.github.com/repos/timescale/timescaledb/forks","keys_url":"https://api.github.com/repos/timescale/timescaledb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timescale/timescaledb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timescale/timescaledb/teams","hooks_url":"https://api.github.com/repos/timescale/timescaledb/hooks","issue_events_url":"https://api.github.com/repos/timescale/timescaledb/issues/events{/number}","events_url":"https://api.github.com/repos/timescale/timescaledb/events","assignees_url":"https://api.github.com/repos/timescale/timescaledb/assignees{/user}","branches_url":"https://api.github.com/repos/timescale/timescaledb/branches{/branch}","tags_url":"https://api.github.com/repos/timescale/timescaledb/tags","blobs_url":"https://api.github.com/repos/timescale/timescaledb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timescale/timescaledb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timescale/timescaledb/git/refs{/sha}","trees_url":"https://api.github.com/repos/timescale/timescaledb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timescale/timescaledb/statuses/{sha}","languages_url":"https://api.github.com/repos/timescale/timescaledb/languages","stargazers_url":"https://api.github.com/repos/timescale/timescaledb/stargazers","contributors_url":"https://api.github.com/repos/timescale/timescaledb/contributors","subscribers_url":"https://api.github.com/repos/timescale/timescaledb/subscribers","subscription_url":"https://api.github.com/repos/timescale/timescaledb/subscription","commits_url":"https://api.github.com/repos/timescale/timescaledb/commits{/sha}","git_commits_url":"https://api.github.com/repos/timescale/timescaledb/git/commits{/sha}","comments_url":"https://api.github.com/repos/timescale/timescaledb/comments{/number}","issue_comment_url":"https://api.github.com/repos/timescale/timescaledb/issues/comments{/number}","contents_url":"https://api.github.com/repos/timescale/timescaledb/contents/{+path}","compare_url":"https://api.github.com/repos/timescale/timescaledb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timescale/timescaledb/merges","archive_url":"https://api.github.com/repos/timescale/timescaledb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timescale/timescaledb/downloads","issues_url":"https://api.github.com/repos/timescale/timescaledb/issues{/number}","pulls_url":"https://api.github.com/repos/timescale/timescaledb/pulls{/number}","milestones_url":"https://api.github.com/repos/timescale/timescaledb/milestones{/number}","notifications_url":"https://api.github.com/repos/timescale/timescaledb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timescale/timescaledb/labels{/name}","releases_url":"https://api.github.com/repos/timescale/timescaledb/releases{/id}","deployments_url":"https://api.github.com/repos/timescale/timescaledb/deployments","created_at":"2017-03-07T20:03:41Z","updated_at":"2018-12-07T17:39:48Z","pushed_at":"2018-12-07T20:14:40Z","git_url":"git://github.com/timescale/timescaledb.git","ssh_url":"git@github.com:timescale/timescaledb.git","clone_url":"https://github.com/timescale/timescaledb.git","svn_url":"https://github.com/timescale/timescaledb","homepage":"http://www.timescale.com/","size":4034,"stargazers_count":6239,"watchers_count":6239,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":293,"mirror_url":null,"archived":false,"open_issues_count":94,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":293,"open_issues":94,"watchers":6239,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/timescale/timescaledb/pulls/876"},"html":{"href":"https://github.com/timescale/timescaledb/pull/876"},"issue":{"href":"https://api.github.com/repos/timescale/timescaledb/issues/876"},"comments":{"href":"https://api.github.com/repos/timescale/timescaledb/issues/876/comments"},"review_comments":{"href":"https://api.github.com/repos/timescale/timescaledb/pulls/876/comments"},"review_comment":{"href":"https://api.github.com/repos/timescale/timescaledb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/timescale/timescaledb/pulls/876/commits"},"statuses":{"href":"https://api.github.com/repos/timescale/timescaledb/statuses/02a013e694e28744111330411583970b46f82372"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cevian"}}