Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/admin/updates/automatic.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Automatic multi-version upgrades

> Warning: Automatic upgrades in v5.10.0 will fail unless the postgres database is upgraded from postgres 12 to postgres 16. Or the environment variable `SRC_AUTOUPGRADE_IGNORE_DRIFT=true` is set on the `sourcegraph-frontend` container. See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
> Warning: Automatic upgrades to v5.10.0 will fail please upgrade to a v5.9.x version and perform a standard upgrade instead! See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!

From **Sourcegraph 5.1 and later**, multi-version upgrades can be performed **automatically** as if they were a standard upgrade for the same deployment type. Automatic multi-version upgrades take the following general form:

Expand Down
4 changes: 3 additions & 1 deletion docs/admin/updates/docker_compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ For upgrade procedures or general info about sourcegraph versioning see the link
## v5.9.0 ➔ v5.10.0

> Warning: This release updates the database container images from postgres 12 to postres 16, and begins using wolfi based images. See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
> Warning: `automatic` and migrator `upgrade` command will not work for this release, please upgrade to a 5.9 version and conduct a standard upgrade using migrator's default `up` command!

#### Notes:
- The container image for pgsql and codeintel-db have been renamed from `postgres-12-alpine` and `codeintel-db` respectively to `postgres16`. The `codeinsights-db` container has been renamed to `postgres-16-codeinsights`.
- The container image for pgsql and codeintel-db have been renamed from `postgres-12-alpine` and `codeintel-db` respectively to `postgresql-16`. The `codeinsights-db` container has been renamed to `postgresql-16-codeinsights`.
- **Admins using external dbs who have not yet upgraded from postgres 12 to postgres 16**, can expect to see database drift after upgrading to `5.10.0`. The new expected schema definition for Sourcegraph is based on postgres 16. The schema drift is the result of automatic changes made to the schema by pg_upgrade utils, and will not cause issues in the application.
- Admins should not run migrators suggested drift fixes, and should instead upgrade their database from postgres 12 to postgres 16.
- The [Autoupgrade](https://sourcegraph.com/docs/admin/updates/automatic#pre-v500-automatic-multiversion-upgrades) upgrade method, will detect drift and exit before conducting the upgrade unless the env var `SRC_AUTOUPGRADE_IGNORE_DRIFT=true` is set in the server container.
- Postgres 12 image containers cannot be started with data volumes which have been upgraded by postgres 16.

## v5.1.4 ➔ v5.1.5

Expand Down
6 changes: 4 additions & 2 deletions docs/admin/updates/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ For upgrade procedures or general info about sourcegraph versioning see the link
## v5.9.0 ➔ v5.10.0

> Warning: This release updates the database container images from postgres 12 to postres 16, and begins using wolfi based images. See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
> Warning: `automatic` and migrator `upgrade` command will not work for this release, please upgrade to a 5.9 version and conduct a standard upgrade using migrator's default `up` command!

#### Notes:
- The container image for pgsql and codeintel-db have been renamed from `postgres-12-alpine` and `codeintel-db` respectively to `postgres16`. The `codeinsights-db` container has been renamed to `postgres-16-codeinsights`.
- The container image for pgsql and codeintel-db have been renamed from `postgres-12-alpine` and `codeintel-db` respectively to `postgresql-16`. The `codeinsights-db` container has been renamed to `postgresql-16-codeinsights`.
- **Admins using external dbs who have not yet upgraded from postgres 12 to postgres 16**, can expect to see database drift after upgrading to `5.10.0`. The new expected schema definition for Sourcegraph is based on postgres 16. The schema drift is the result of automatic changes made to the schema by pg_upgrade utils, and will not cause issues in the application.
- Admins should not run migrators suggested drift fixes, and should instead upgrade their database from postgres 12 to postgres 16.
- The [Autoupgrade](https://sourcegraph.com/docs/admin/updates/automatic#pre-v500-automatic-multiversion-upgrades) upgrade method, will detect drift and exit before conducting the upgrade unless the env var `SRC_AUTOUPGRADE_IGNORE_DRIFT=true` is set in the server container.
- Postgres 12 image containers cannot be started with data volumes which have been upgraded by postgres 16.


## v5.1.0 -> v5.2.0

Expand Down
5 changes: 2 additions & 3 deletions docs/admin/updates/server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ For upgrade procedures or general info about sourcegraph versioning see the link

#### Notes:

> WARNING: **In 5.10 the Sourcegraph database images are being updated from postgres 12 to postgres 16 to avoid postgres 12's end of life. This update will not yet be applied to Sourcegraph server's all in one database.**
> Warning: **In 5.10 the Sourcegraph database images are being updated from postgres 12 to postgres 16 to avoid postgres 12's end of life. This update will not yet be applied to Sourcegraph server's all in one database.**
> Warning: `automatic` and migrator `upgrade` command will not work for this release, please upgrade to a 5.9 version and conduct a standard upgrade using migrator's default `up` command!

**What does this mean for admins?**
- During the postgres version upgrade `pg_upgrade` automatically makes some changes to the database schema.
- The new canonical database schema is now based on postgres 16, the drift detection tool will report drift between the old and new database schema. This is expected and is a result of the postgres upgrade.
- Until the database is upgraded migrator will require the `--skip-drift-check` flag to proceed with upgrades.
- Admins should not run migrators suggested drift fixes until the database is upgraded.
- The [Autoupgrade](https://sourcegraph.com/docs/admin/updates/automatic#pre-v500-automatic-multiversion-upgrades) upgrade method, will detect drift and exit before conducting the upgrade unless the env var `SRC_AUTOUPGRADE_IGNORE_DRIFT=true` is set in the server container.


## v5.0.6 ➔ v5.1.0
Expand Down
2 changes: 2 additions & 0 deletions docs/technical-changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This page documents all notable changes to Sourcegraph. For more detailed change

> Warning: This release updates the database container images from postgres 12 to postres 16, and begins using wolfi based images. See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
>
> Warning: `automatic` and migrator `upgrade` command will not work for this release, please upgrade to a 5.9 version and conduct a standard upgrade using migrator's default `up` command!
>
> Also be sure to check your deployment type's [upgrade notes](http://sourcegraph.com/docs/admin/updates#instance-specific-procedures)!

## v5.10.0
Expand Down