{"action":"created","issue":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/803","repository_url":"https://api.github.com/repos/greenplum-db/gpdb","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/803/labels{/name}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/803/comments","events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/803/events","html_url":"https://github.com/greenplum-db/gpdb/pull/803","id":157648902,"number":803,"title":"Avoid \"HEAP_MOVED_OFF was expected\" errors in VACUUM FULL.","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,"milestone":null,"comments":5,"created_at":"2016-05-31T11:26:25Z","updated_at":"2016-06-01T07:35:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/803","html_url":"https://github.com/greenplum-db/gpdb/pull/803","diff_url":"https://github.com/greenplum-db/gpdb/pull/803.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/803.patch"},"body":"If a page has hint bits set, but the buffer has not been marked as dirty,\r\nand it gets evicted between the 1st and 2nd vacuum pass, the 2nd pass\r\ngets upset. That can't happen in the upstream, as setting a hint bit\r\nalways marks the buffer as dirty, but that is not guaranteed in GPDB, because\r\nof gp_disable_tuple_hints."},"comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments/222915872","html_url":"https://github.com/greenplum-db/gpdb/pull/803#issuecomment-222915872","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/803","id":222915872,"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},"created_at":"2016-06-01T07:35:48Z","updated_at":"2016-06-01T07:35:48Z","body":"On 31/05/16 14:31, Atri Sharma wrote:\n> I am a bit concerned about the lost update that we have when page is\n> evicted without being marked dirty. IMO this is a waste of a scan of\n> potentially a large table. Not that this is concerning this PR, but I\n> have never liked the GUC anyways. Is it actually useful?\n\nThat's a fair question. It's certainly true that you could save a lot of \nCPU cycles by setting the hint bits, if you repeatedly scan the same \ntable. It's a CPU vs. IO tradeoff. Overall, I actually think that \ndisabling them makes sense (or to be precise, to not mark the buffer \ndirty when a hint bit is set). While you save on CPU, the I/O penalty of \ndirtying pages is huge. It's been discussed on pgsql-hackers many times \nover the years as well, and many people have suggested doing exactly \nwhat GPDB does, but it hasn't gone anywhere. The tradeoff might be \ndifferent between OLTP and OLAP workloads too.\n\nBut that's a different story.\n\n> IMO if we disable setting hint bits, then it should only be for\n> tables which have limited set of inserting transactions and for them,\n> we should have a hint bit cache (if we do not already). Plain\n> disabling of hint bits is a bit broken, IMO.\n\nThere is a one-element cache on the clog lookups, so if you lookup the \nsame XID repeatedly, it's pretty cheap. Not quite as cheap as checking \nthe hint bit, but still cheap. That helps a lot.\n\n- Heikki\n"}}
{"actor":{"display_login":"hlinnaka"}}