Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1idDYD-0000Ga-HN for pgsql-jdbc@arkaria.postgresql.org; Fri, 06 Dec 2019 13:21:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1idDYC-0003Qs-4T for pgsql-jdbc@arkaria.postgresql.org; Fri, 06 Dec 2019 13:21:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1idDYB-0003Ql-Ks for pgsql-jdbc@lists.postgresql.org; Fri, 06 Dec 2019 13:21:39 +0000 Received: from out-20.smtp.github.com ([192.30.252.203]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1idDY8-0006LX-Ph for pgsql-jdbc@lists.postgresql.org; Fri, 06 Dec 2019 13:21:38 +0000 Date: Fri, 06 Dec 2019 05:21:35 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1575638495; bh=Ylzp8v1ay2JeBQ6epIVOqJcTQk4V2snrRoeXGADPiew=; h=Date:From:To:Subject:From; b=lmPh7zF/deYcMMAXvHU20/YIL+fswBE56/llefibXJtk8royi0jX2W4D2k8L6Jevd VzCeXnu+RrQH8gbkDt3YR+OBDJhEyjD027fqjlP6R4kehMSn2SDoQTZMx5XXo4deRB yEwKyWxJAiftg1qTHKEgD1VKdFJLE10GETNpJax8= From: Craig Ringer To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] b37115: Prevent use of extended query protocol for BEGIN b... Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Approved: 58GruLoMopuc X-GitHub-Recipient-Address: pgsql-jdbc@lists.postgresql.org X-Auto-Response-Suppress: All List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: b37115373935732b1ab5e59b56837ac49942718a https://github.com/pgjdbc/pgjdbc/commit/b37115373935732b1ab5e59b56837ac49942718a Author: Craig Ringer Date: 2019-12-06 (Fri, 06 Dec 2019) Changed paths: M pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java Log Message: ----------- Prevent use of extended query protocol for BEGIN before COPY (#1639) When autocommit is off and the first query in a transaction is a COPY, we were sending a BEGIN using the extended query protocol. It was being permitted to use named portals as well, ignoring prepareThreshold. Fix by forcing simple query mode and marking the BEGIN as oneshot. Fixes #1638