Troubleshoot
Duplicate version
This happens if a migration version has already completed successfully and you are trying to apply the same version. Once the migration is successful, its version string is occupied and can't be reused. You can still retry the failed migration.
This error is more common in GitOps flow when you try to modify an existing migration file. Refer to the GitOps troubleshoot to learn the correct workflow.
PostgreSQL
Also applicable to Redshift and RisingWave
ERROR: permission denied to set role xxx (SQLSTATE 42501)
This could happen if you turn on Postgres database tenant mode.
You need to grant the database owner permission to the Bytebase user configured in your PostgreSQL instance.
ERROR: must be owner of table xxx (SQLSTATE 42501)
This could happen if you turn on Postgres database tenant mode.
For some sophisticated setup where database owner and table owner are different, this causes problem.
Because only table owner can alter that table schema, and if the database owner is not a member of
the table owner, then the execution will throw the ERROR: must be owner of table xxx
error.
One way to workaround this is to grant the table owner permission to the database owner:
ERROR: permission denied for table xxx (SQLSTATE 42501)
See above.
ERROR: permission denied for table xxx pg_dump: detail: Query was: LOCK TABLE xxx IN ACCESS SHARE MODE
You may encounter this error when executing the schema migration on PostgreSQL databases.
When Bytebase executes schema migration, it will use pg_dump to record the before/after schema snapshot.
This error happens when the user configured in the Bytebase PostgreSQL instance doesn't have the SELECT permission on the table. Let's suppose the Bytebase user
configured in the Bytebase PG instance is called bytebase
. You should grant
the table SELECT permission to bytebase
:
Ask for support
If you still can't resolve, please check the Bytebase user permission. Contact us with the query result.