title: Liquibase: ERROR: CREATE DATABASE cannot run inside a transaction block
body: <p>I am trying to create a db on PostgreSQL using liquibase. This is my dbchangelog file</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  
  &lt;databaseChangeLog
    xmlns=&quot;http://www.liquibase.org/xml/ns/dbchangelog&quot;
    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation=&quot;http://www.liquibase.org/xml/ns/dbchangelog
           http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd&quot;&gt;
    &lt;changeSet  author=&quot;testuser&quot;  id=&quot;3&quot;&gt;
      &lt;sql  dbms=&quot;postgresql&quot;
              endDelimiter=&quot;;&quot;&gt;
              CREATE DATABASE testdb;
      &lt;/sql&gt;
    &lt;/changeSet&gt;
  &lt;/databaseChangeLog
  </code></pre>
  <p>When i try to run <code>liquibase update</code> from my project directory i am getting</p>
  <pre><code>Unexpected error running Liquibase: ERROR: CREATE DATABASE cannot run inside a transaction block [Failed SQL: (0) CREATE DATABASE testdb] 
  </code></pre>
  <p>I saw setting  AUTOCOMMIT = ON in PostgreSQL  will solve this issue.But this method only works for PostgreSQL 9.4 and below . But i am using AWS RDS PostgreSQL 9.6.8</p>