Skip to content

Commit

Permalink
Default to PostgreSQL 16 for development
Browse files Browse the repository at this point in the history
This includes a bump in the pgrx version used
  • Loading branch information
feikesteenbergen authored and cevian committed Nov 30, 2023
1 parent 604f0b5 commit 68f4f99
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/matrix/dependencies.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"0.0.0": {
"pg-version": [
"15.4"
"16.1"
],
"ts-version": [
"2.11.x"
"2.13.x"
]
}
}
8 changes: 4 additions & 4 deletions .github/workflows/deb-packager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
required: true
default: ''
PG:
description: 'PG major version. Default: 15'
description: 'PG major version. Default: 16'
required: false
default: '15'
default: '16'
PG_MIN:
description: 'PG minor version. Default: 4'
description: 'PG minor version. Default: 1'
required: false
default: '4'
default: '1'

jobs:
packager:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
fail-fast: false
matrix:
cloud_image_tag_prefix:
- pg15
- pg16
pgversion:
- 15
- 16
tsversion:
- 2.11
- 2.13
steps:
- name: Checkout Timescale Vector
uses: actions/checkout@v3
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.3-labs
ARG PG_VERSION=15
ARG TIMESCALEDB_VERSION_MAJMIN=2.11
ARG PGRX_VERSION=0.10.0
ARG PG_VERSION=16
ARG TIMESCALEDB_VERSION_MAJMIN=2.13
ARG PGRX_VERSION=0.11.1
ARG BASE_IMAGE=timescale/timescaledb-ha:pg${PG_VERSION}-ts${TIMESCALEDB_VERSION_MAJMIN}-all

FROM timescale/timescaledb-ha:pg${PG_VERSION}-ts${TIMESCALEDB_VERSION_MAJMIN}-all AS ha-build-tools
Expand Down Expand Up @@ -87,8 +87,8 @@ WORKDIR /build/timescale-vector
RUN PG_CONFIG="/usr/lib/postgresql/${PG_VERSION}/bin/pg_config" make package

## COPY over the new files to the image. Done as a seperate stage so we don't
## ship the build tools. Fixed pg15 image is intentional. The image ships with
## PG 12, 13, 14 and 15 binaries. The PATH environment variable below is used
## ship the build tools. Fixed pg16 image is intentional. The image ships with
## PG 12, 13, 14, 15 and 16 binaries. The PATH environment variable below is used
## to specify the runtime version.
FROM ${BASE_IMAGE}
ARG PG_VERSION
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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 then run

```shell
sudo apt-get install make gcc pkg-config clang postgresql-server-dev-15 libssl-dev
sudo apt-get install make gcc pkg-config clang postgresql-server-dev-16 libssl-dev
```

Next you need cargo-pgx, which can be installed with
Expand All @@ -22,7 +22,7 @@ You must reinstall cargo-pgx whenever you update your Rust compiler, since cargo

Finally, setup the pgx development environment with
```shell
cargo pgrx init --pg15 pg_config
cargo pgrx init --pg16 pg_config
```

Installing from source is also available on macOS and requires the same set of prerequisites and set up commands listed above.
Expand All @@ -48,7 +48,7 @@ The Timescale Vecotr project is still in the initial planning stage as we decide
🔨 Testing
See above for prerequisites and installation instructions.

You can run tests against a postgres version pg15 using
You can run tests against a postgres version pg16 using
```shell
cargo pgrx test ${postgres_version}
```
Expand Down
7 changes: 4 additions & 3 deletions timescale_vector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ edition = "2021"
crate-type = ["cdylib"]

[features]
default = ["pg15"]
default = ["pg16"]
pg15 = ["pgrx/pg15", "pgrx-tests/pg15"]
pg16 = ["pgrx/pg16", "pgrx-tests/pg16"]
pg_test = []

[dependencies]
memoffset = "0.9.0"
pgrx = "=0.10.0"
pgrx = "=0.11.1"
rkyv = { version="0.7.42", features=["validation"]}
simdeez = {version = "1.0"}
reductive = { version = "0.9.0"}
Expand All @@ -28,7 +29,7 @@ rayon = "1"


[dev-dependencies]
pgrx-tests = "=0.10.0"
pgrx-tests = "=0.11.1"

[profile.dev]
panic = "unwind"
Expand Down
1 change: 0 additions & 1 deletion timescale_vector/src/access_method/distance_x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use simdeez::scalar::*;
use simdeez::sse2::*;
use simdeez::sse41::*;
use simdeez::*;
//use simdeez::avx::*;
use simdeez::avx2::*;

Expand Down
2 changes: 1 addition & 1 deletion timescale_vector/src/access_method/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod pq;
")]
fn amhandler(_fcinfo: pg_sys::FunctionCallInfo) -> PgBox<pg_sys::IndexAmRoutine> {
let mut amroutine =
unsafe { PgBox::<pg_sys::IndexAmRoutine>::alloc_node(pg_sys::NodeTag_T_IndexAmRoutine) };
unsafe { PgBox::<pg_sys::IndexAmRoutine>::alloc_node(pg_sys::NodeTag::T_IndexAmRoutine) };

amroutine.amstrategies = 0;
amroutine.amsupport = 0; //TODO
Expand Down
6 changes: 2 additions & 4 deletions timescale_vector/src/access_method/options.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use memoffset::*;
use pgrx::pg_sys::AsPgCStr;
use pgrx::prelude::*;
use pgrx::*;
use pgrx::{pg_sys::AsPgCStr, prelude::*, set_varsize, PgRelation};
use std::fmt::Debug;

#[derive(Copy, Clone, Debug, PartialEq)]
Expand Down Expand Up @@ -84,7 +82,7 @@ pub unsafe extern "C" fn amoptions(
build_relopts(reloptions, validate, tab)
}

#[cfg(any(feature = "pg13", feature = "pg14", feature = "pg15"))]
#[cfg(any(feature = "pg13", feature = "pg14", feature = "pg15", feature = "pg16"))]
unsafe fn build_relopts(
reloptions: pg_sys::Datum,
validate: bool,
Expand Down

0 comments on commit 68f4f99

Please sign in to comment.