Skip to content

Commit 2bd4506

Browse files
d-bytebaseclaudeh3n4lCopilot
authored
docs: improve external PostgreSQL user requirements documentation (#813)
* docs: improve external PostgreSQL user requirements documentation - Clarify three distinct user privilege options (superuser, database owner, schema create) - Add SQL examples for each privilege configuration - Note cloud database limitations for superuser option - Simplify database creation instructions - Update connection string example with clearer placeholders - Add reference to official PostgreSQL URI documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * docs: add db_owner role grant as fourth user privilege option - Add Option 4 for granting db_owner role to bytebase user - Provides an alternative method for database ownership privileges 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * Update mintlify/get-started/self-host/external-postgres.mdx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: h3n4l <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 9c3eb84 commit 2bd4506

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

mintlify/get-started/self-host/external-postgres.mdx

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,47 @@ PostgreSQL 14 or above.
1010

1111
### Database
1212

13-
The connecting `database` must be created in advance. **The database should use UTF-8 for encoding. UTF-8 encoding is mandatory across the entire system**.
13+
Create a database named `bytebase` with UTF-8 encoding. UTF-8 encoding is required for proper system operation.
1414

1515
### User
1616

17+
Create a user `bytebase` with one of the following privilege levels:
18+
19+
#### Option 1: Superuser
1720
<Note>
21+
This option is not available on managed database services like AWS RDS or Google Cloud SQL.
22+
</Note>
1823

19-
For Cloud Database such as AWS RDS, GCP Cloud SQL, ensure that the `user` either owns the schema (`public`) and `database`, or has the necessary privileges to access them.
24+
Grant PostgreSQL superuser privileges:
25+
```sql
26+
ALTER ROLE bytebase SUPERUSER;
27+
```
2028

21-
- `ALTER DATABASE database OWNER TO bytebase;`
22-
- `ALTER SCHEMA public OWNER TO bytebase;`
29+
#### Option 2: Database Owner
30+
Make the user own the database:
31+
```sql
32+
ALTER DATABASE bytebase OWNER TO bytebase;
33+
```
2334

24-
</Note>
35+
#### Option 3: Schema Create Privilege
36+
Grant CREATE privilege on the public schema:
37+
```sql
38+
GRANT CREATE ON SCHEMA public TO bytebase;
39+
```
2540

26-
The connecting `user` must have all the following database privileges:
27-
28-
- SELECT
29-
- INSERT
30-
- UPDATE
31-
- DELETE
32-
- TRUNCATE
33-
- REFERENCES
34-
- TRIGGER
35-
- CREATE
36-
- CONNECT
37-
- TEMPORARY
38-
- EXECUTE
39-
- USAGE
41+
#### Option 4: Database Owner Role
42+
Grant the db_owner role to the user:
43+
```sql
44+
GRANT db_owner TO bytebase;
45+
```
4046

4147
### PG_URL String Format
4248

43-
**Supported format:**
44-
45-
_postgresql://\<\<user>>:\<\<secret>>@\<\<host>>:\<\<port>>/\<\<database>\>_
49+
Bytebase uses the standard PostgreSQL connection URI format. See the [official PostgreSQL documentation](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS) for complete details.
4650

4751
**Example:**
4852

49-
_postgresql://bytebase:z\*3kd2@example.com:5432/meta_
53+
_postgresql://bytebase:your_password@example.com:5432/bytebase_
5054

5155
## Running with Docker
5256

0 commit comments

Comments
 (0)