Skip to content

Commit

Permalink
Merge branch 'fc-23.05-dev' into fc-23.05-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dpausp committed Jun 29, 2023
2 parents 0c0f30d + 1ef5c91 commit 8ed02e4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions doc/src/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ Managed instance of the [PostgreSQL](http://postgresql.org) database server.

- PostgreSQL server (versions 11, 12, 13, 14, 15)

:::{warning}

PostgreSQL 15 changed schema permission handling for new databases. Before,
users that had `ALL` privileges for a database also were able to create tables and
other objects in the `public` schema. Now, the `CREATE` privilege has to be
granted explicitly for the schema.

This also means that setting up permissions by using the NixOS option
`services.postgresql.ensureUsers.*.ensurePermissions` is not enough if the user
needs to create tables. NixOS doesn't support setting permissions on a schema, yet.

To grant `CREATE` privilege to user `test` using SQL, execute:

~~~sql
GRANT CREATE ON SCHEMA public TO test;
~~~

See [Schemas and Privileges](https://www.postgresql.org/docs/15/ddl-schemas.html#DDL-SCHEMAS-PRIV)
in the PostgreSQL documentation for more information.
:::

## Configuration

Managed PostgreSQL instances already have a production-grade configuration with
Expand Down

0 comments on commit 8ed02e4

Please sign in to comment.