Summary:
Original commit: 0b7f8840ef86ae32c7fec84a54cd538b11c8f9eb / D41990
# Upgrade Support for PG15
### Stage 1:
- Start a Yugabyted node and load a sample dataset.
```
./bin/yugabyted start --base_dir /mnt/disks/disk2/yugabyted-base-dir
./bin/yugabyted demo connect --base_dir /mnt/disks/disk2/yugabyted-base-dir
./bin/yugabyted upgrade check_version_compatibility
```
### Stage 2:
- Restart the yugabyted node for the upgrade
- First restart will only restart the master process with PG15 version and tserver processes will be started with old version.
```
./bin/yugabyted stop --upgrade true --base_dir /mnt/disks/disk2/yugabyted-base-dir
./bin/yugabyted start --base_dir /mnt/disks/disk2/yugabyted-base-dir
```
### Stage 3:
- Upgrade the ysql catalog and restart the nodes
- during this restart, both master and tserver will be started with PG15 versions.
```
./bin/yugabyted upgrade ysql_catalog --base_dir /mnt/disks/disk2/yugabyted-base-dir
./bin/yugabyted stop --upgrade true --base_dir /mnt/disks/disk2/yugabyted-base-dir
./bin/yugabyted start --base_dir /mnt/disks/disk2/yugabyted-base-dir
```
### Stage 4:
- Finalize the upgrade to PG15 version.
```
./bin/yugabyted upgrade finalize_new_version --base_dir /mnt/disks/disk2/yugabyted-base-dir
```
Jira: DB-13891
Test Plan: Manaul Tests
Reviewers: sgarg-yb, djiang
Reviewed By: sgarg-yb
Subscribers: yugabyted-dev
Differential Revision: https://phorge.dev.yugabyte.com/D42242