General Postgres

General PostgreSQL

If you are not using AWS RDS or Aurora Postgres, use these general instructions to configure your Postgres database.


To ensure you have the correct permissions set, run the following commands as the database user you will use Readyset with:

1. Ensure Postgres version 13.0 or higher is running.

testdb=> SELECT version();
 PostgreSQL 14.8
(1 row)

2. Ensure that logical replication is enabled.

testdb=> SHOW WAL_LEVEL;
(1 row)

LOGICAL is required to ensure sufficient data is present in the replication stream.

3. Ensure superuser permissions are enabled.

Readyset uses superuser access to be notified of changes to table DDL.

testdb=> SELECT * FROM pg_user where usename = CURRENT_USER;
 usename  | usesysid | usecreatedb | usesuper | userepl | usebypassrls |  passwd  | valuntil | useconfig
 postgres |       10 | t           | t        | t       | t            | ******** |          |
(1 row)

Ensure the usesuper variable is true.

4. Decide on how to deal with unsupported features.

Some Postgres features, like row-level security, are not yet supported by Readyset. You can either skip replicating those tables into Readyset (in Step 2 – Install Readyset), or alternatively, you can disable these features on tables replicated by Readyset prior to proceeding.