Hi Pat,
That error is expected. ALTER DEFAULT PRIVILEGES FOR ROLE can only be run by members of that role.
The Lakebase docs say it in their own example: "only members of table_creator_role_name can run this command". databricks_writer_16840 is the internal role the sync pipeline uses to own synced tables, and your admin identity isn't a member of it. Default privileges are also tied to the role that creates the object, so defaults set for your migration identity will never apply to synced tables.
Two options that work within the documented model:
1. Grant pg_read_all_data to the reader role
databricks_superuser inherits pg_read_all_data, which is how it reads synced tables without per-table grants. Granting the same predefined role to your reader covers every current and future table, synced ones included:
GRANT pg_read_all_data TO reader_role;
The catch is scope. It applies to all schemas in the database, not just target_schema. If other schemas hold data the reader shouldn't see, it's too broad. Test it first with your admin role, since granting predefined roles needs CREATEROLE or admin rights.
2. Re-run the grant right after each synced table is created
Keep your current GRANT SELECT ON ALL TABLES IN SCHEMA target_schema as a step that runs right after the job or migration that creates the synced table. It's idempotent and cheap, and the access stays limited to target_schema. Since you already sync into a dedicated schema, this is the cleanest option if least privilege matters.
Docs:
Synced tables, ownership and granting access: https://docs.databricks.com/aws/en/oltp/projects/sync-tables
Default privileges in Lakebase: https://learn.microsoft.com/en-us/azure/databricks/oltp/projects/manage-roles-permissions
Postgres predefined roles: https://www.postgresql.org/docs/current/predefined-roles.html
Thomaz A. Rossito Neto
Principal Data Architect & AI Strategy — CI&T
thomazn@ciandt.com
linkedin.com/in/thomaz-antonio-rossito-neto | Databricks Solutions Architect Champion