From 1291b12090bbb03bd92b92e42a1567ae5b1c96ad Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Tue, 22 Oct 2024 00:38:19 -0700 Subject: [PATCH] Added Postgres 18 to CI [skip ci] --- .github/workflows/build.yml | 4 ++-- src/hnsw.c | 4 ++++ src/ivfflat.c | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b81560..717a3fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,8 +8,8 @@ jobs: fail-fast: false matrix: include: - # - postgres: 18 - # os: ubuntu-24.04 + - postgres: 18 + os: ubuntu-24.04 - postgres: 17 os: ubuntu-24.04 - postgres: 16 diff --git a/src/hnsw.c b/src/hnsw.c index 2a61dd4..be90f0b 100644 --- a/src/hnsw.c +++ b/src/hnsw.c @@ -131,6 +131,10 @@ hnswcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, *indexSelectivity = 0; *indexCorrelation = 0; *indexPages = 0; +#if PG_VERSION_NUM >= 180000 + /* See "On disable_cost" thread on pgsql-hackers */ + path->path.disabled_nodes = 2; +#endif return; } diff --git a/src/ivfflat.c b/src/ivfflat.c index 730651b..3910c07 100644 --- a/src/ivfflat.c +++ b/src/ivfflat.c @@ -99,6 +99,10 @@ ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, *indexSelectivity = 0; *indexCorrelation = 0; *indexPages = 0; +#if PG_VERSION_NUM >= 180000 + /* See "On disable_cost" thread on pgsql-hackers */ + path->path.disabled_nodes = 2; +#endif return; }