PostgreSQL with timescaledb and pgmp extensions (multi-precision arithmetic) for arm64
1.5K
TimescaleDB is an open-source database extension for PostgreSQL to make SQL scalable for time-series data. For more information, see the Timescale website.
PGMP is an open-source database extension for PostgreSQL that supports arbitrary precision numeric data fields, including fractions and arithmetic using the GNU GMP package, installed via PGXN network, see the PGXN entry.
Both timescaledb and pgmp extensions are pre-loaded in the database template(s).
This image has been built on a Raspberry Pi 5 and is intended for use only on arm64 architectures (such as Raspberry Pi). It is based on the official Postgres docker image so the documentation for that image also applies here, including the environment variables one can set, extensibility, etc.
The TimescaleDB portions of this image corresond to the timescaledb docker github entry.
$ docker run -e POSTGRES_PASSWORD=topsecret -e TIMESCALEDB_TELEMETRY=off -d --name test-timescaledbmp marcelgsteiger/timescaledbmp:latest-pg17.5
Then wait until the database is initialized and then verify the loaded extensions and execute a simple pgmp function like limit_den (approximates a floating point value as an exact fraction):
$ docker exec -e PGPASSWORD=topsecret -it test-timescaledbmp psql -U postgres -c \
"select version(); select extname,extversion from pg_extension; select limit_den(10.1::float8);" version
--------------------------------------------------------------------------------------------------------------------
PostgreSQL 17.5 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
(1 row)
extname | extversion
-------------+------------
plpgsql | 1.0
pgmp | 1.1
timescaledb | 2.20.0
(3 rows)
limit_den
-----------
101/10
(1 row)
You can also connect your app, e.g. via port 15432 on the host machine, if you map the port to port 5432 in the container as usual (see below).
Note that if the cluster has previously been initialized, you should not use the environment variable TIMESCALEDB_TELEMETRY again.
timescaledb-tune runs automatically on container initialization. By default,
timescaledb-tune uses system calls to retrieve an instance's available CPU
and memory. In docker images, these system calls reflect the available resources
on the host. For cases where a container is allocated all available
resources on a host, this is fine. But many use cases involve limiting the
amount of resources a container (or the docker daemon) can have on the host.
Therefore, this image looks in the cgroups metadata to determine the
docker-defined limit sizes then passes those values to timescaledb-tune.
To specify your own limits, use the TS_TUNE_MEMORY and TS_TUNE_NUM_CPUS
environment variables at runtime:
$ docker run -d --name timescaledbmp -p 15432:5432 -e POSTGRES_PASSWORD=password -e TS_TUNE_MEMORY=4GB -e TS_TUNE_NUM_CPUS=4
To specify a maximum number of [background workers](https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/abo>
$ docker run -d --name timescaledbmp -p 15432:5432 -e POSTGRES_PASSWORD=password -e TS_TUNE_MAX_BG_WORKERS=16 marcelgsteiger/timescaledbmp:latest-pg17.0
To specify a maximum number of connections, use
$ docker run -d --name timescaledbmp -p 15432:5432 -e POSTGRES_PASSWORD=password -e TS_TUNE_MAX_CONNS=200 marcelgsteiger/timescaledbmp:latest-pg17.0
To not run timescaledb-tune at all, use the NO_TS_TUNE environment variable:
$ docker run -d --name timescaledbmp -p 15432:5432 -e POSTGRES_PASSWORD=password -e NO_TS_TUNE=true marcelgsteiger/timescaledbmp:latest-pg17.0
Content type
Image
Digest
sha256:f16f92362…
Size
191.5 MB
Last updated
over 1 year ago
docker pull marcelgsteiger/timescaledbmp:latest-pg17.5