Tiger Cloud: Performance, Scale, Enterprise
Self-hosted products
MST
TimescaleDB is a Postgres extension for
time series and demanding workloads that ingest and query high volumes of data. You can install a TimescaleDB
instance on any local system, from source.
This section shows you how to:
- Install and configure TimescaleDB on Postgres - set up a self-hosted Postgres instance to efficiently run TimescaleDB1.
- Add the TimescaleDB extension to your database - enable TimescaleDB features and performance improvements on a database.
Development and production environments
The following instructions are for development and testing installations. For a production environment, we strongly recommend that you implement the following, many of which you can achieve using Postgres tooling.
- Incremental backup and database snapshots, with efficient point-in-time recovery.
- High availability replication, ideally with nodes across multiple availability zones.
- Automatic failure detection with fast restarts, for both non-replicated and replicated deployments.
- Asynchronous replicas for scaling reads when needed.
- Connection poolers for scaling client connections.
- Zero-down-time minor version and extension upgrades.
- Forking workflows for major version upgrades and other feature testing.
- Monitoring and observability.
Deploying for production? With a Tiger Cloud service we tune your database for performance and handle scalability, high availability, backups and management so you can relax.
To install TimescaleDB from source, you need the following on your developer environment:
Postgres:
Install a supported version of Postgres using the Postgres installation instructions
.
We recommend not using TimescaleDB with Postgres 17.1, 16.5, 15.9, 14.14, 13.17, 12.21.
These minor versions introduced a breaking binary interface changethat, once identified, was reverted in subsequent minor Postgres versions 17.2, 16.6, 15.10, 14.15, 13.18, and 12.22. When you build from source, best practice is to build with Postgres 17.2, 16.6, etc and higher. Users of Tiger Cloud
and Platform packages built and distributed by TigerData are unaffected.
Build tools:
C language compiler for your operating system, such as
gcc
orclang
.If you are using a Microsoft Windows system, you can install Visual Studio 2015 or later instead of CMake and a C language compiler. Ensure you install the Visual Studio components for CMake and Git when you run the installer.
This section shows you how to install the latest version of Postgres and TimescaleDB on a supported platform using source supplied by TigerData.
Install the latest Postgres source
At the command prompt, clone the TimescaleDB GitHub repository:
git clone https://github.com/timescale/timescaledbChange into the cloned directory:
cd timescaledbCheckout the latest release. You can find the latest release tag on our Releases page
:
git checkout 2.17.2This command produces an error that you are now in
detached head
state. It is expected behavior, and it occurs because you have checked out a tag, and not a branch. Continue with the steps in this procedure as normal.
Build the source
Bootstrap the build system:
For installation on Microsoft Windows, you might need to add the
pg_config
andcmake
file locations to your path. In the Windows Search tool, search forsystem environment variables
. The path forpg_config
should beC:\Program Files\PostgreSQL\<version>\bin
. The path forcmake
is within the Visual Studio directory.Build the extension:
Install TimescaleDB
Configure Postgres
If you have more than one version of Postgres installed, TimescaleDB can only be associated with one of them. The TimescaleDB build scripts use
pg_config
to find out where Postgres stores its extension files, so you can usepg_config
to find out which Postgres installation TimescaleDB is using.Locate the
postgresql.conf
configuration file:psql -d postgres -c "SHOW config_file;"Open the
postgresql.conf
file and updateshared_preload_libraries
to:shared_preload_libraries = 'timescaledb'If you use other preloaded libraries, make sure they are comma separated.
Tune your Postgres instance for TimescaleDB
sudo timescaledb-tuneThis script is included with the
timescaledb-tools
package when you install TimescaleDB. For more information, see configuration.Restart the Postgres instance:
Set the user password
Log in to Postgres as
postgres
sudo -u postgres psqlYou are in the psql shell.
Set the password for
postgres
\password postgresWhen you have set the password, type
\q
to exit psql.
For improved performance, you enable TimescaleDB on each database on your self-hosted Postgres instance.
This section shows you how to enable TimescaleDB for a new database in Postgres using psql
from the command line.
Connect to a database on your Postgres instance
In Postgres, the default user and database are both
postgres
. To use a different database, set<database-name>
to the name of that database:psql -d "postgres://<username>:<password>@<host>:<port>/<database-name>"Add TimescaleDB to the database
CREATE EXTENSION IF NOT EXISTS timescaledb;Check that TimescaleDB is installed
\dxYou see the list of installed extensions:
List of installed extensionsName | Version | Schema | Description-------------+---------+------------+---------------------------------------------------------------------------------------plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural languagetimescaledb | 2.17.2 | public | Enables scalable inserts and complex queries for time-series data (Community Edition)Press q to exit the list of extensions.
And that is it! You have TimescaleDB running on a database on a self-hosted instance of Postgres.
What next? Try the key features offered by TigerData, see the tutorials, interact with the data in your Tiger Cloud service using your favorite programming language, integrate your Tiger Cloud service with a range of third-party tools, plain old Use TigerData products, or dive into the API reference.
Keywords
Found an issue on this page?Report an issue or Edit this page
in GitHub.