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 1iZHVl-0003Y3-Tb for pgsql-jdbc@arkaria.postgresql.org; Mon, 25 Nov 2019 16:46:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iZHVk-0002uq-JA for pgsql-jdbc@arkaria.postgresql.org; Mon, 25 Nov 2019 16:46:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZHVk-0002ui-9o for pgsql-jdbc@lists.postgresql.org; Mon, 25 Nov 2019 16:46:52 +0000 Received: from out-10.smtp.github.com ([192.30.254.193]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZHVg-0003bL-Bl for pgsql-jdbc@lists.postgresql.org; Mon, 25 Nov 2019 16:46:51 +0000 Date: Mon, 25 Nov 2019 08:46:45 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1574700405; bh=a6PCihEKx9SaBfVg3SdWv1env+OdHGSVLYSFk13WA2g=; h=Date:From:To:Subject:From; b=svgT5dXhmq0AmIJaGjnshcbzodrqbDM8My7oknk57/eza98dbXYOnovmiX9IQIO/a ZKIb+vwkcx3OXJLh9Gb2Zq5BVYnCHlbId8GUeR8d1WcTCQPFyhiu4AGYvuosdxZzRx 0C3f44eZn8UaAXCrWVd/tw/p5ujVAvl2VYxqN6m8= From: Brett Okken To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] 050797: feat: read only transactions (#1252) 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: 050797934a8a9c0ce2dff068eba14931988370ca https://github.com/pgjdbc/pgjdbc/commit/050797934a8a9c0ce2dff068eba14931988370ca Author: Brett Okken Date: 2019-11-25 (Mon, 25 Nov 2019) Changed paths: M pgjdbc/src/main/java/org/postgresql/PGProperty.java M pgjdbc/src/main/java/org/postgresql/core/BaseConnection.java M pgjdbc/src/main/java/org/postgresql/core/QueryExecutor.java M pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java M pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java M pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java M pgjdbc/src/main/java/org/postgresql/jdbc/PgStatement.java M pgjdbc/src/test/java/org/postgresql/test/jdbc2/ConnectionTest.java Log Message: ----------- feat: read only transactions (#1252) * feat: read only transactions If autocommit is set to false, read only will be set on begin transaction. If autocommit is true, it will continue to be managed at session level. The queries to change session have been cached to avoid re-parsing each time readonly value changes. https://github.com/pgjdbc/pgjdbc/issues/1228 https://github.com/pgjdbc/pgjdbc/issues/848 * feat: read only transactions * checkstyle and hamcrest test import * add connection property with 3 options to control read only behavior * fix missing property methods on BaseDataSource * avoid redundant static modifier * more loosely couple read only hints to backend * return default read only mode from data source. * avoid case conversion