Message-ID: From: "rbygrave (@rbygrave)" To: "pgjdbc/pgjdbc" Date: Tue, 07 Jun 2022 21:35:11 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #194: PgJDBC can experience client/server deadlocks during batch execution In-Reply-To: References: List-Id: X-GitHub-Author-Login: rbygrave X-GitHub-Comment-Id: 1149192044 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2022-06-07T22:29:13Z X-GitHub-Issue: 194 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/194#issuecomment-1149192044 Content-Type: text/plain; charset=utf-8 > quite big but not crazy big - 20k rows, 10 columns To me 20k sounds very big. Have you benchmarked that against smaller batch sizes (like batch size 1000, 100, 50, 20)? When I benchmark test insert batching looking to find a reasonably optimal batch size I don't recall going over 1k (and generally it is way smaller batch size). I kind of think of it as approximately filling a network packet, often 100 is a good batch size but it will depend on width of columns etc. Edit: Read the full history and the test case - very interesting re NOTIFY and size of returning content and blowing out the buffers.