Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Pg17 #819

Merged
merged 7 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fail-fast: false
max-parallel: 12
matrix:
pgversion: [13, 14, 15, 16]
pgversion: [13, 14, 15, 16, 17]
container:
- os: rockylinux
version: "9"
Expand Down
32 changes: 18 additions & 14 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[![CI](https://github.com/timescale/timescaledb-toolkit/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/timescale/timescaledb-toolkit/actions/workflows/ci.yml)


# TimescaleDB Toolkit #
# TimescaleDB Toolkit

This repository is the home of the TimescaleDB Toolkit team. Our mission is to
ease all things analytics when using TimescaleDB, with a particular focus on
Expand All @@ -14,16 +13,15 @@ Documentation for this version of the TimescaleDB Toolkit extension can be found
in this repository at [`docs`](https://github.com/timescale/timescaledb-toolkit/tree/main/docs).
The release history can be found on this repo's [GitHub releases](https://github.com/timescale/timescaledb-toolkit/releases).

## 🖥 Try It Out

## 🖥 Try It Out ##

The extension comes pre-installed on all [Timescale Cloud](https://www.timescale.com/products#timescale-cloud) instances and also on our full-featured [`timescale/timescaledb-ha` docker image](https://hub.docker.com/r/timescale/timescaledb-ha).
The extension comes pre-installed on all [Timescale Cloud](https://www.timescale.com/products#timescale-cloud) instances and also on our full-featured [`timescale/timescaledb-ha` docker image](https://hub.docker.com/r/timescale/timescaledb-ha).

If DEB and RPM packages are a better fit for your situation, refer to the [Install Toolkit on self-hosted TimescaleDB](https://docs.timescale.com/self-hosted/latest/tooling/install-toolkit/#install-toolkit-on-self-hosted-timescaledb) how-to guide for further instructions on installing the extension via your package manager.

All versions of the extension contain experimental features in the `toolkit_experimental` schema. See [our docs section on experimental features](/docs/README.md#tag-notes) for more details.

## 💿 Installing From Source ##
## 💿 Installing From Source

### Supported platforms

Expand All @@ -34,22 +32,26 @@ The engineering team regularly tests the extension on the following platforms:
- x86_64-apple-darwin (MacOS 12) (tested frequently on eng workstation)
- aarch64-apple-darwin (MacOS 12) (tested frequently on eng workstation)

As for other platforms: patches welcome!
As for other platforms: patches welcome!

### 🔧 Tools Setup ###
### 🔧 Tools Setup

Building the extension requires valid [rust](https://www.rust-lang.org/) (we build and test on 1.65), [rustfmt](https://github.com/rust-lang/rustfmt), and clang installs, along with the postgres headers for whichever version of postgres you are running, and pgrx.
We recommend installing rust using the [official instructions](https://www.rust-lang.org/tools/install):

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

and build tools, the postgres headers, in the preferred manner for your system. You may also need to install OpenSSl.
For Ubuntu you can follow the [postgres install instructions](https://www.postgresql.org/download/linux/ubuntu/) then run

```bash
sudo apt-get install make gcc pkg-config clang postgresql-server-dev-14 libssl-dev
```

Next you need [cargo-pgrx](https://github.com/tcdi/pgrx), which can be installed with

```bash
cargo install --version '=0.10.2' --force cargo-pgrx
Jo0 marked this conversation as resolved.
Show resolved Hide resolved
```
Expand All @@ -62,28 +64,31 @@ Finally, setup the pgrx development environment with
cargo pgrx init --pg14 pg_config
```


Installing from source is also available on macOS and requires the same set of prerequisites and set up commands listed above.

### 💾 Building and Installing the extension ###
### 💾 Building and Installing the extension

Download or clone this repository, and switch to the `extension` subdirectory, e.g.

```bash
git clone https://github.com/timescale/timescaledb-toolkit && \
cd timescaledb-toolkit/extension
```

Then run

```
cargo pgrx install --release && \
cargo run --manifest-path ../tools/post-install/Cargo.toml -- pg_config
```

To initialize the extension after installation, enter the following into `psql`:

```
CREATE EXTENSION timescaledb_toolkit;
```

## ✏️ Get Involved ##
## ✏️ Get Involved

The TimescaleDB Toolkit project is still in the initial planning stage as we
decide our priorities and what to implement first. As such, now is a great time
Expand All @@ -92,17 +97,16 @@ to help shape the project's direction! Have a look at the
and feel free to comment on the features, expand the list, or
hop on the [Discussions forum](https://github.com/timescale/timescaledb-toolkit/discussions) for more in-depth discussions.

### 🔨 Testing ###
### 🔨 Testing

See above for prerequisites and installation instructions.

You can run tests against a postgres version `pg12`, `pg13`, `pg14`, `pg15` or `pg16` using
You can run tests against a postgres version `pg12`, `pg13`, `pg14`, `pg15`, `pg16` or `pg17` using

```
cargo pgrx test ${postgres_version}
```


## 🐯 About TimescaleDB

**[TimescaleDB](https://github.com/timescale/timescaledb)** is a
Expand Down
6 changes: 3 additions & 3 deletions docker/ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ if $privileged; then
centos | rockylinux)
case $OS_VERSION in
7)
export PG_VERSIONS="13 14 15"
export TSDB_PG_VERSIONS="13 14 15"
export PG_VERSIONS="13 14 15 16 17"
export TSDB_PG_VERSIONS="13 14 15 16 17"
# Postgresql packages require both
# - llvm-toolset-7-clang from centos-release-scl-rh
# - llvm5.0-devel from epel-release
Expand Down Expand Up @@ -151,7 +151,7 @@ EOF
debian | ubuntu)
# TimescaleDB does not have packages for Debian 12
if [ $OS_VERSION -ge 12 ]; then
export TSDB_PG_VERSIONS="13 14 15"
export TSDB_PG_VERSIONS="13 14 15 16 17"
fi

# Image comes in with no package lists so we have to start with this.
Expand Down
11 changes: 6 additions & 5 deletions extension/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ edition = "2021"
crate-type = ["cdylib"]

[features]
default = ["pg15"]
default = ["pg16"]
pg12 = ["pgrx/pg12", "pgrx-tests/pg12"]
pg13 = ["pgrx/pg13", "pgrx-tests/pg13"]
pg14 = ["pgrx/pg14", "pgrx-tests/pg14"]
pg15 = ["pgrx/pg15", "pgrx-tests/pg15"]
pg16 = ["pgrx/pg16", "pgrx-tests/pg16"]
pg17 = ["pgrx/pg17", "pgrx-tests/pg17"]
pg_test = ["approx"]

[dependencies]
# Keep synchronized with `cargo install --version N.N.N cargo-pgrx` in Readme.md and docker/ci/Dockerfile
# Also `pgrx-tests` down below in `dev-dependencies`.
pgrx = "=0.10.2"
pgrx-macros = "=0.10.2"
pgrx-sql-entity-graph = "=0.10.2"
pgrx = "=0.12.6"
pgrx-macros = "=0.12.6"
pgrx-sql-entity-graph = "=0.12.6"
encodings = {path="../crates/encodings"}
flat_serialize = {path="../crates/flat_serialize/flat_serialize"}
flat_serialize_macro = {path="../crates/flat_serialize/flat_serialize_macro"}
Expand Down Expand Up @@ -57,5 +58,5 @@ spfunc = "0.1.0"
statrs = "0.15.0"

[dev-dependencies]
pgrx-tests = "=0.10.2"
pgrx-tests = "=0.12.6"
approx = "0.4.0"
2 changes: 1 addition & 1 deletion tools/build
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ usage() {
}

require_pg_version() {
[ -n "$pg_version" ] || die 'specify one of -pg12 | -pg13 | -pg14 | -pg15 | -pg16'
[ -n "$pg_version" ] || die 'specify one of -pg12 | -pg13 | -pg14 | -pg15 | -pg16 | -pg17'
}

find_pg_config() {
Expand Down
6 changes: 3 additions & 3 deletions tools/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# All our automation scripts read this, so at least we're not duplicating this
# information across all those.

PG_VERSIONS='12 13 14 15 16'
PG_VERSIONS='12 13 14 15 16 17'
# TODO: extend this with 16 this once TimescaleDB supports PostgreSQL 16: issue #5752
TSDB_PG_VERSIONS='12 13 14 15'
TSDB_PG_VERSIONS='12 13 14 15 16 17'

CARGO_EDIT=0.11.2

# Keep synchronized with extension/Cargo.toml and `cargo install --version N.N.N cargo-pgrx` in Readme.md .
PGRX_VERSION=0.10.2
PGRX_VERSION=0.12.6

RUST_TOOLCHAIN=1.70.0
RUST_PROFILE=minimal
Expand Down
Loading