You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document describes how to test changes to the PostgreSQL upgrade scripts on a running machine.
4
+
5
+
## Prerequisites
6
+
7
+
- A running PostgreSQL instance
8
+
- Access to the Supabase Postgres repository
9
+
- Permissions to run GitHub Actions workflows
10
+
- ssh access to the ec2 instance
11
+
12
+
## Development Workflow
13
+
14
+
1.**Make Changes to Upgrade Scripts**
15
+
- Make your changes to the scripts in `ansible/files/admin_api_scripts/pg_upgrade_scripts/`
16
+
- Commit and push your changes to your feature branch
17
+
- For quick testing, you can also edit the script directly on the server at `/etc/adminapi/pg_upgrade_scripts/initiate.sh`
18
+
19
+
2.**Publish Script Changes** (Only needed for deploying to new instances)
20
+
- Go to [publish-nix-pgupgrade-scripts.yml](https://github.com/supabase/postgres/actions/workflows/publish-nix-pgupgrade-scripts.yml)
21
+
- Click "Run workflow"
22
+
- Select your branch
23
+
- Run the workflow
24
+
25
+
3.**Publish Binary Flake Version** (Only needed for deploying to new instances)
26
+
- Go to [publish-nix-pgupgrade-bin-flake-version.yml](https://github.com/supabase/postgres/actions/workflows/publish-nix-pgupgrade-bin-flake-version.yml)
27
+
- Click "Run workflow"
28
+
- Select your branch
29
+
- Run the workflow
30
+
- Note: Make sure the flake version includes the PostgreSQL version you're testing (e.g., 17)
31
+
32
+
4.**Test on Running Machine**
33
+
ssh into the machine
34
+
```bash
35
+
# Stop PostgreSQL
36
+
sudo systemctl stop postgresql
37
+
38
+
# Run the upgrade script in local mode with your desired flake version
0 commit comments