Protected branches
Lakebase Postgres (Autoscaling Beta) is the next version of Lakebase, available for evaluation only. For production workloads, use Lakebase Public Preview. See choosing between versions to understand which version is right for you.
Protected branches help you safeguard critical database branches from accidental modifications or deletions.
What are protected branches?
Protected branches are database branches with special rules that restrict certain operations. Lakebase's protected branches feature implements the following protections:
- Protected branches cannot be deleted
- Protected branches cannot be reset
- Projects with protected branches cannot be deleted
- Computes associated with a protected branch cannot be deleted
- New passwords are automatically generated for Postgres roles on branches created from protected branches. See New passwords for child branches
- Protected branches are not archived due to inactivity
Set a branch as protected
To set a branch as protected:
- Navigate to Branches in the Lakebase App and select the branch you want to protect.
- Click Protect and confirm your selection.
Your branch is now designated as protected, as indicated by the shield icon that appears next to the branch name on the Branches page and branch details page.
New passwords for child branches
When you create a branch in Lakebase, it includes all Postgres databases and roles from the parent branch. By default, Postgres roles on the child branch have the same passwords as on the parent branch. However, this does not apply to protected branches.
When you create a child branch from a protected branch, new passwords are automatically generated for the matching Postgres roles on the child branch.
This behavior is designed to prevent the exposure of passwords that could be used to access your protected branch. For example, if you have designated a production branch as protected, the automatic password change for child branches ensures that you can create child branches for development or testing without risking access to data on your production branch.
Resetting or restoring a child branch from a protected parent branch preserves passwords for matching Postgres roles on the child branch. This ensures that existing connections to the child branch continue to work after reset or restore operations.
Remove branch protection
To remove a protected branch designation:
- Navigate to the branch page for the protected branch.
- Click More, select Set as unprotected, and confirm your selection.