{"action":"created","issue":{"url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/287","labels_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/287/comments","events_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/287/events","html_url":"https://github.com/pgjdbc/pgjdbc/pull/287","id":81096787,"number":287,"title":"Customize default fetchSize for statements","user":{"login":"Gordiychuk","id":10699594,"avatar_url":"https://avatars.githubusercontent.com/u/10699594?v=3","gravatar_id":"","url":"https://api.github.com/users/Gordiychuk","html_url":"https://github.com/Gordiychuk","followers_url":"https://api.github.com/users/Gordiychuk/followers","following_url":"https://api.github.com/users/Gordiychuk/following{/other_user}","gists_url":"https://api.github.com/users/Gordiychuk/gists{/gist_id}","starred_url":"https://api.github.com/users/Gordiychuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gordiychuk/subscriptions","organizations_url":"https://api.github.com/users/Gordiychuk/orgs","repos_url":"https://api.github.com/users/Gordiychuk/repos","events_url":"https://api.github.com/users/Gordiychuk/events{/privacy}","received_events_url":"https://api.github.com/users/Gordiychuk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-26T19:15:18Z","updated_at":"2015-05-29T18:57:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pgjdbc/pgjdbc/pulls/287","html_url":"https://github.com/pgjdbc/pgjdbc/pull/287","diff_url":"https://github.com/pgjdbc/pgjdbc/pull/287.diff","patch_url":"https://github.com/pgjdbc/pgjdbc/pull/287.patch"},"body":"After migration big application from Oracle to PostgreSQL we faced with problem that application use too many memory and as result it lead to OutOfMemoryException. The application that has been developing for more than one year which develops many developers usually there are several entry points to the database. It can be use manually Connection\\Statements\\etc or it can be Spring JdbcTemplate or some own implementation. Common points it's application server datasource in that configure connection to postgresql. And it's a good point for configure global parameters like default fetch size that allow facilitate migration from Oracle and its default value of 10 to PostgreSQL where by default fetches all records at once.\r\n\r\n![postgresql_oom](https://cloud.githubusercontent.com/assets/10699594/7820949/3aaf3f3e-03f4-11e5-8274-1c36fba37392.png)\r\n\r\nI add additional property 'defaultRowFetchSize' that can be specify on connection. It parameter means default value for fetch size on Statement. All statements creates via connection on that specify it property will have correspond value. It value can be override via explicit execute Statement#setFetchSize"},"comment":{"url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/comments/106903604","html_url":"https://github.com/pgjdbc/pgjdbc/pull/287#issuecomment-106903604","issue_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/287","id":106903604,"user":{"login":"Gordiychuk","id":10699594,"avatar_url":"https://avatars.githubusercontent.com/u/10699594?v=3","gravatar_id":"","url":"https://api.github.com/users/Gordiychuk","html_url":"https://github.com/Gordiychuk","followers_url":"https://api.github.com/users/Gordiychuk/followers","following_url":"https://api.github.com/users/Gordiychuk/following{/other_user}","gists_url":"https://api.github.com/users/Gordiychuk/gists{/gist_id}","starred_url":"https://api.github.com/users/Gordiychuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gordiychuk/subscriptions","organizations_url":"https://api.github.com/users/Gordiychuk/orgs","repos_url":"https://api.github.com/users/Gordiychuk/repos","events_url":"https://api.github.com/users/Gordiychuk/events{/privacy}","received_events_url":"https://api.github.com/users/Gordiychuk/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T18:57:51Z","updated_at":"2015-05-29T18:57:51Z","body":"I also update docs repo https://github.com/pgjdbc/www/pull/8\r\n"}}