PostgreSQL image generaed by GeniePG
100K+
Tmax OpenSQL is an open-source DBMS professional service platform brand of TmaxTibero, a DBMS specialized S/W company. TmaxTibero, Korea's leading DBMS company, provides PostgreSQL service as a one stop total service based on its own technology accumulated for 20 years.
Tmax OpenSQL provides the best integrated service for high availability, scalability, large-capacity processing, backup/recovery, security, encryption, compatibility, monitoring, and transition support technology based on TmaxTibero's unique technical experience and know-how.
14.0 : PostgreSQL 14.0 on redhat/ubi8
14.1 : PostgreSQL 14.1 on redhat/ubi8
14.2 : PostgreSQL 14.2 on redhat/ubi8
14.3 : PostgreSQL 14.3 on redhat/ubi8
14.4 : PostgreSQL 14.4 on redhat/ubi8
14.5 : PostgreSQL 14.5 on redhat/ubi8
14.6 : PostgreSQL 14.6 on redhat/ubi8
docker run -v [absolute/path/on/host/OS]:[absolute/path/in/container]
--name [container_name]
hypersql/postgres:[tag_name]
If you put it in the vars directory as vars.yml, the parameters are set when the container is created.
docker run -v /absolute/path/to/var/file:/tmp/settings/vars/vars.yml
or
docker run -v /absolute/path/to/vars/directory:/tmp/settings/vars
Parameters that can be applied to the autotuning, manage_dbserver, and init_dbserver roles are available. Please refer to the README.md of each role of pg-ansible for available parameters: https://github.com/hypersql/pg-ansible
pg_superuser: "super_username"
pg_superuser_password: "xxxxx"
pg_owner_id: 1000
pg_group_id: 1000
pg_data: "/pgdata"
pg_log: "/pglog"
pg_wal: "/pgwal"
pg_databases:
- name: "database_name"
owner: "super_username"
pg_postgres_conf_params:
- name: "archive_command"
value: "/bin/true"
pg_max_connections: 50
When a Tmax OpenSQL-PG image is created, it automatically tunes its parameters by referring to docker container isolated resources. Parameters to be tuned are set through core and memory, and the value to be tuned can be changed through docker container resource isolation.
docker run --memory="300m"
Set number of cpus
Specifies that only CPU cores 0 to 2 are used.
docker run --cpuset-cpus="0-2"
Set CPUs period and quota
Set the container's CPU CFS quota and scheduler period. The quota defines how much to allocate in the cpu-period setting. The scheduler period does not change the default value of 100000 (100 ms) in most cases.
docker run --cpu-period=100000 --cpu-quota=50000
It can set it as a percentage of CPU to easily set the CFS scheduler allocation.
Example Using 50% CPU:
docker run --cpus=".5"
When mounting a volume in docker, the permission of the container user and the HostOS user can be a problem. Volumes created by docker are stored in the /var/lib/docker/volumes/ path, making it difficult for users with other privileges to access them. Therefore, opensql recommends creating and using a docker volume rather than directly mounting the volume.
If you want to know the path of the created volume, use the following command.
docker volume inspect <volume_name>
Create volume in docker
docker create volume-1
docker run -v volume-1:/path/want/to/mount
Create volume in docker-compose Declared volumes can be reused in other docker containers.
services:
pg:
image: hypersql/postgres:14.6
ports:
- "5432":"5432"
volumes:
- volume-1:/path/want/to/mount
volumes:
volume-1:
Migration is required to use what was used in the previously used hypersql docker image.
The migration image is set according to the new image, and the migration container needs the previously used environments.
docker run -v /absolute/path/to/external/volume:/hypersql/pgdata/ \
-v /absolute/path/to/external/volume:/hypersql/pgwal/ \
-e POSTGRES_USER={PG_USER} \
-e POSTGRES_PASSWORD=${PG_PASSWORD} \
-e POSTGRES_DB=${DB_NAME}} \
-e POSTGRES_DATADIR=${DATADIR} \
hypersql/postgres:migration-14
After the migration is complete, the new image runs normally.
PostgreSQL is autotuned based on:
max_connections
pg_max_connectionsshared_buffers
work_mem
maintenance_work_mem
effective_cache_size
wal_compression
wal_log_hints
wal_buffers
checkpoint_timeout
checkpoint_completion_target
cpu_tuple_cost
autovacuum_max_workers
autovacuum_vacuum_cost_limit
idle_in_transaction_session_timeout
default_statistics_target
hash_mem_multiplier
Content type
Image
Digest
sha256:b2ad9ad3e…
Size
966.7 MB
Last updated
almost 3 years ago
docker pull tmaxopensql/postgres:14.4