JuliusBrussee/caveman · error
postgres: tenant schema isolation incomplete: %s
Error message
postgres: tenant schema isolation incomplete: %s
What it means
Error "postgres: tenant schema isolation incomplete: %s" thrown in JuliusBrussee/caveman.
Source
Thrown at shared/platform/postgresconfig/postgresconfig.go:245
tx, err := pool.BeginTx(ctx, pgx.TxOptions{
IsoLevel: pgx.RepeatableRead,
AccessMode: pgx.ReadOnly,
})
if err != nil {
return fmt.Errorf("postgres: begin tenant schema inspection: %w", err)
}
defer tx.Rollback(ctx)
tables, err := inspectTenantTables(ctx, tx)
if err != nil {
return fmt.Errorf("postgres: inspect tenant tables: %w", err)
}
foreignKeys, err := inspectTenantForeignKeys(ctx, tx)
if err != nil {
return fmt.Errorf("postgres: inspect tenant foreign keys: %w", err)
}
if violations := tenantSchemaViolations(tables, foreignKeys); len(violations) > 0 {
return fmt.Errorf("postgres: tenant schema isolation incomplete: %s", strings.Join(violations, "; "))
}
if err := validateResolverSchema(ctx, tx); err != nil {
return err
}
if err := tx.Commit(ctx); err != nil {
return fmt.Errorf("postgres: finish tenant schema inspection: %w", err)
}
return nil
}
func inspectTenantTables(ctx context.Context, queryer catalogQuerier) ([]tenantTableSchema, error) {
rows, err := queryer.Query(ctx, `
SELECT c.relname,
NOT organization.attnotnull,
c.relrowsecurity,
c.relforcerowsecurity,
pol.oid IS NOT NULL,
coalesce(pol.polpermissive, false),View on GitHub (pinned to 27d5a3981a)
Solutions
- Complete tenant schema isolation (RLS/privileges) as described.
When it happens
Trigger: Thrown at shared/platform/postgresconfig/postgresconfig.go:245 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/59be185af82b6ce9.
Report an issue: GitHub.