Use External PostgreSQL Database
By default, Bytebase bundles an embedded PostgreSQL instance for storing its own metadata. Alternatively, you can supply --pg to store these metadata in an external PostgreSQL database.
Prerequisites
- PostgreSQL 12 or above.
- All privileges on the database object including:
- SELECT
- INSERT
- UPDATE
- DELETE
- TRUNCATE
- REFERENCES
- TRIGGER
- CREATE
- CONNECT
- TEMPORARY
- EXECUTE
- USAGE
--pg connection string
Supported format:
-
postgresql://user:secret@host:port/dbname
-
postgresql://user:secret@host:port/dbname?sslrootcert=root.pem
Example:
- postgresql://bytebase:z*3kd2@example.com:5432/meta
- postgresql://bytebase:z*3kd2@example.com:5432/meta?sslrootcert=root.pem
Notes
user
must be specified.dbname
must be specified and must be created in advance. The connectinguser
must have all the database privileges mentioned above.