{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26345","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26345/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26345/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26345/events","html_url":"https://github.com/cockroachdb/cockroach/pull/26345","id":328860782,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjY2NTcw","number":26345,"title":"sql: fixing \"copy from stdin\" issues","user":{"login":"andreimatei","id":377201,"node_id":"MDQ6VXNlcjM3NzIwMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/377201?v=4","gravatar_id":"","url":"https://api.github.com/users/andreimatei","html_url":"https://github.com/andreimatei","followers_url":"https://api.github.com/users/andreimatei/followers","following_url":"https://api.github.com/users/andreimatei/following{/other_user}","gists_url":"https://api.github.com/users/andreimatei/gists{/gist_id}","starred_url":"https://api.github.com/users/andreimatei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreimatei/subscriptions","organizations_url":"https://api.github.com/users/andreimatei/orgs","repos_url":"https://api.github.com/users/andreimatei/repos","events_url":"https://api.github.com/users/andreimatei/events{/privacy}","received_events_url":"https://api.github.com/users/andreimatei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"knz","id":642886,"node_id":"MDQ6VXNlcjY0Mjg4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/642886?v=4","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false},"assignees":[{"login":"knz","id":642886,"node_id":"MDQ6VXNlcjY0Mjg4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/642886?v=4","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2018-06-03T20:47:45Z","updated_at":"2018-06-04T19:05:53Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/26345","html_url":"https://github.com/cockroachdb/cockroach/pull/26345","diff_url":"https://github.com/cockroachdb/cockroach/pull/26345.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/26345.patch"},"body":"See individual commits."},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/394464145","html_url":"https://github.com/cockroachdb/cockroach/pull/26345#issuecomment-394464145","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26345","id":394464145,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDQ2NDE0NQ==","user":{"login":"knz","id":642886,"node_id":"MDQ6VXNlcjY0Mjg4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/642886?v=4","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T19:05:53Z","updated_at":"2018-06-04T19:05:53Z","author_association":"MEMBER","body":"\n\n\n\nReview status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks pending.\n\n---\n\n*[pkg/sql/copy.go, line 219 at r3](https://reviewable.io/reviews/cockroachdb/cockroach/26345#-LEB0pDz0JMLlk7rz2Y-:-LEBAtl-8syXi-TGduVq:b3vhxs9) ([raw file](https://github.com/cockroachdb/cockroach/blob/fa00a03cae27b35da861b1c5286d8cdcca630ad4/pkg/sql/copy.go#L219)):*\n<details><summary><i>Previously, andreimatei (Andrei Matei) wrote…</i></summary><blockquote>\n\nI understand how it works.\nBut we've already \"asked Go's heap\" - `data` has been already allocated (without accounting) when we read it off the network.  And since one copy of data is unaccounted, I think we might as well have two unaccounted copies. So the mantra is that we're accounting for memory used in between packets and we consider the scratch space needed for processing one packet as noise. I think that's more honest than putting more accounting before we copy into the buffer.\nWhat do you think?\n\nI've moved to using the buffer's capacity versus the buffer's length in the accounting we do have, however. It seems slightly better...\n</blockquote></details>\n\nYour explanation merely tells me that we're missing accounting of the `data` buffer in pgwire. This is another problem (which we also need to solve).\n\nYes the capacity is better but I still think that if we make 2 copies of the data we need to account for both before they are actually allocated.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io/reviews/cockroachdb/cockroach/26345)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"knz"}}