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
feat: if upgrade 17 -> 17 modify upgrade process (#1583)
* feat: if upgrade 17 -> 17 or 17-orioledb -> 17-orioledb do not run these queries
* feat: handle all cases of SERVER_LC_COLLATE and SERVER_LC_CTYPE
* fix: explixit set on 17/oriole
* feat: handling max_slot_wal_keep_size for pg 17 was needed as well
* feat: binary upgrades require max_slot_wal_keep_size to be -1 during binary upgrade
* fix: Better to override that during the upgrade process by specifying the option directly when pg_upgrade is executed (-c)
* fix: cover only pg 17
* fix: rm oriole handling
* fix: do not need max_slot_wal_keep_size on old version
* fix: temp config on new-options too
* fix: remove unbound var
* chore: remove complete.sh change that should not have been committed
* chore: bump for testing
* chore: stash code
* feat: working pg 17 upgrade
* feat: pg 15 handling
* feat: rm oriole handling, refine 15 -> 17 config
* feat: make sure old pg stops if not force stop
* chore: bump version
* chore: cleanup + bump version for test
* fix: rollback to working version with fix from divit
* chore: version bump
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