Skip to content

superuser for psql plugins #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions apps/docs/content/postgresql/how-to/manage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,27 @@ You can use various database management tools from your local workstation to con

## How to install and manage PostgreSQL plugins

### Viewing available plugins
You can list all available PostgreSQL plugins by running the following query *(superuser privileges not required)*:

```sql
SELECT * FROM pg_available_extensions ORDER BY name;
```

To install plugins, you must **connect as a superuser** (see note below) and run the appropriate CREATE EXTENSION command. For example:
### Installing plugins (requires superuser)

```sql
CREATE EXTENSION pg_stat_statements;
CREATE EXTENSION vector;
CREATE EXTENSION postgis;
```
1. **Connect with superuser credentials**:
- Use the `superUser` (user `postgres`) and `superUserPassword` environment variables from your PostgreSQL service

:::info Superuser Credentials
The PostgreSQL superuser credentials can be found in the `superUser` and `superUserPassword` environment variables of your PostgreSQL service.
:::
2. **Switch to your service database**:
When logging in as the superuser, you're initially in the `postgres` database, not your service database.

3. **Install required extensions**:
```sql
CREATE EXTENSION pg_stat_statements;
CREATE EXTENSION vector;
CREATE EXTENSION postgis;
```

:::warning
Currently, it is not possible to add new plugins that are not already listed in `pg_available_extensions`.
Expand Down