Skip to content

Commit

Permalink
Merge pull request #9927 from IQSS/9920_postgres16
Browse files Browse the repository at this point in the history
support Postgres 16, bump Flyway
  • Loading branch information
pdurbin authored Jan 8, 2024
2 parents 4c628fb + 8ec0098 commit 17bfeb9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions doc/release-notes/9920-postgres16.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This release adds install script support for the new permissions model in Postgres versions 15+, and bumps FlyWay to support Postgres 16.

Postgres 13 remains the version used with automated testing.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<packaging.type>war</packaging.type>

<reload4j.version>1.2.18.4</reload4j.version>
<flyway.version>9.21.2</flyway.version>
<flyway.version>9.22.1</flyway.version>
<jhove.version>1.20.1</jhove.version>
<poi.version>5.2.1</poi.version>
<tika.version>2.4.1</tika.version>
Expand Down Expand Up @@ -911,7 +911,7 @@
<skipIntegrationTests>true</skipIntegrationTests>
<!-- Once we truly run tests with Testcontainers, this should be switch to "docker", activating ITs -->
<packaging.type>docker-build</packaging.type>
<postgresql.server.version>13</postgresql.server.version>
<postgresql.server.version>16</postgresql.server.version>

<app.image>gdcc/dataverse:${app.image.tag}</app.image>
<app.image.tag>unstable</app.image.tag>
Expand Down
6 changes: 5 additions & 1 deletion scripts/installer/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,13 @@
conn.close()

if int(pg_major_version) >= 15:
admin_conn_string = "dbname='"+pgDb+"' user='postgres' password='"+pgAdminPassword+"' host='"+pgHost+"'"
conn = psycopg2.connect(admin_conn_string)
conn.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
cur = conn.cursor()
conn_cmd = "GRANT CREATE ON SCHEMA public TO "+pgUser+";"
print("PostgreSQL 15 or higher detected. Running " + conn_cmd)
try:
print("PostgreSQL 15 or higher detected. Running " + conn_cmd)
cur.execute(conn_cmd)
except:
if force:
Expand Down

0 comments on commit 17bfeb9

Please sign in to comment.