mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
Clean up the table schema to get rid of legacy tables and functionality that makes it more difficult to provide an upgrade path. Notable changes: * Get rid of legacy tables and code * Simplify directory structure for SQL code * Simplify table hierarchy: remove root table and make chunk tables * inherit directly from main table * Change chunk table suffix from _data to _chunk * Simplify schema usage: _timescaledb_internal for internal functions. * _timescaledb_catalog for metadata tables. * Remove postgres_fdw dependency * Improve code comments in sql code
39 lines
767 B
Bash
Executable File
39 lines
767 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
if [[ -z "$IMAGE_NAME" ]]; then
|
|
echo "The IMAGE_NAME must be set"
|
|
exit 1
|
|
fi
|
|
|
|
DOCKER_HOST=${DOCKER_HOST:-localhost}
|
|
CONTAINER_NAME=${CONTAINER_NAME:-timescaledb}
|
|
DATA_DIR=${DATA_DIR-$PWD/data}
|
|
BIN_CMD=${BIN_CMD:-postgres}
|
|
PGPORT=${PGPORT:=5432}
|
|
|
|
VOLUME_MOUNT=""
|
|
if [[ -n "$DATA_DIR" ]]; then
|
|
VOLUME_MOUNT="-v $DATA_DIR:/var/lib/postgresql/data"
|
|
fi
|
|
docker run -d \
|
|
--name $CONTAINER_NAME $VOLUME_MOUNT \
|
|
-p ${PGPORT}:5432 \
|
|
-e PGDATA=/var/lib/postgresql/data/timescaledb \
|
|
$IMAGE_NAME $BIN_CMD \
|
|
-cshared_preload_libraries=timescaledb \
|
|
-clog_line_prefix="%m [%p]: [%l-1] %u@%d" \
|
|
-clog_error_verbosity=VERBOSE
|
|
|
|
set +e
|
|
for i in {1..10}; do
|
|
sleep 2
|
|
|
|
pg_isready -h $DOCKER_HOST
|
|
|
|
if [[ $? == 0 ]] ; then
|
|
exit 0
|
|
fi
|
|
|
|
done
|