-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added auto upgrade for major version changes
- Loading branch information
1 parent
9a18b62
commit aab84b5
Showing
3 changed files
with
210 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,28 @@ | ||
# Postgresql docker image | ||
[![build multirach postgresql Docker image and push to it dockerhub](https://github.com/openremote/postgresql/actions/workflows/postgresql.yml/badge.svg)](https://github.com/openremote/postgresql/actions/workflows/postgresql.yml) | ||
|
||
PostgreSQL docker image based on [Timescale's](https://www.timescale.com/) [timescaledev/timescaledb-ha](https://hub.docker.com/r/timescaledev/timescaledb-ha) docker image which contains post GIS and timescaleDB extensions. | ||
POSTGIS and TimescaleDB (inc. toolkit for hyperfunctions) image built for aarch64 support using `timescaledev/timescaledb-ha` base image with: | ||
|
||
- OR specific ENV variables and a healthcheck added | ||
- PGDATA path set to match old Alpine image (for ease of DB migration) | ||
- POSTGRES user UID and GID changed to match old Alpine image (for ease of DB migration) | ||
- Auto upgrade of database with PG major version changes from previous PG major version; can be disabled using | ||
OR_DISABLE_AUTO_UPGRADE=true. | ||
- OR_DISABLE_REINDEX env variable with associated scripts to determine if a REINDEX of the entire DB should be carried | ||
out at first startup with existing DB (checks whether or not $PGDATA/OR_REINDEX_COUNTER.$OR_REINDEX_COUNTER exists). | ||
This is used when a collation change has occurred (glibc version change, muslc <-> glibc) which can break the indexes; | ||
migration can either be manually handled or auto handled depending on OR_DISABLE_REINDEX env variable value. | ||
NOTE THAT A REINDEX CAN TAKE A LONG TIME DEPENDING ON THE SIZE OF THE DB! And startup will be delayed until completed | ||
This functionality is intended to simplify migration for basic users; advanced users with large DBs should take care of this | ||
themselves. | ||
|
||
`timescale/timescaledb-ha` image is ubuntu based and only currently supports amd64; they are working on ARM64 support in timescaledev/timescaledb-ha see: | ||
|
||
https://github.com/timescale/timescaledb-docker-ha/pull/355 | ||
|
||
See this issue for POSTGIS base image aarch64 support discussion: | ||
|
||
https://github.com/postgis/docker-postgis/issues/216 | ||
|
||
TODO: Switch over to timescale/timescaledb-ha once arm64 supported | ||
We get POSTGIS and timescale+toolkit from this image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters