Message-ID: From: "ringerc (@ringerc)" To: "pgjdbc/pgjdbc" Date: Wed, 22 Jan 2020 05:59:45 +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: ringerc X-GitHub-Comment-Id: 577021800 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 194 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/194#issuecomment-577021800 Content-Type: text/plain; charset=utf-8 I increasingly think I need to find the time to make PgJDBC use separate threads for tx and rx so the method-caller's thread can retain control. PgJDBC can then wait on multiple events in possible deadlock scenarios, i.e. "when tx buffer is full, sleep until tx buffer writeable OR rx buffer readable". Shouldn't even be that hard.