Skip to content

Commit 3fc1395

Browse files
committed
Removed 16 pg support.
1 parent d9224c3 commit 3fc1395

8 files changed

Lines changed: 15 additions & 29 deletions

File tree

.github/workflows/pg-extension-build.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ on:
88
workflow_dispatch:
99
inputs:
1010
pg_version:
11-
description: "PostgreSQL version to build (16, 17, 18, or all)"
11+
description: "PostgreSQL version to build (17, 18, or all)"
1212
required: false
1313
default: "18"
1414
type: choice
1515
options:
16-
- "16"
1716
- "17"
1817
- "18"
1918
- all
@@ -50,8 +49,8 @@ jobs:
5049
id: set-versions
5150
run: |-
5251
if [ "${PG_VERSION}" == "all" ]; then
53-
echo "versions=[\"16\",\"17\",\"18\"]" >> "${GITHUB_OUTPUT}"
54-
echo "versions-list=16,17,18" >> "${GITHUB_OUTPUT}"
52+
echo "versions=[\"17\",\"18\"]" >> "${GITHUB_OUTPUT}"
53+
echo "versions-list=17,18" >> "${GITHUB_OUTPUT}"
5554
else
5655
echo "versions=[\"${PG_VERSION}\"]" >> "${GITHUB_OUTPUT}"
5756
echo "versions-list=${PG_VERSION}" >> "${GITHUB_OUTPUT}"

cpp/CMakeLists.pg.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
option(BUILD_PG_16 "Build PostgreSQL 16 extension" OFF)
21
option(BUILD_PG_17 "Build PostgreSQL 17 extension" OFF)
32
option(BUILD_PG_18 "Build PostgreSQL 18 extension" ON)
43
option(USE_DEEPLAKE_SHARED "Use shared library for deeplake_api (default: auto-detect)" OFF)
54

65
set(PG_MODULE deeplake_pg)
76
set(PG_VERSIONS)
87

9-
if(BUILD_PG_16)
10-
list(APPEND PG_VERSIONS 16)
11-
endif()
12-
138
if(BUILD_PG_17)
149
list(APPEND PG_VERSIONS 17)
1510
endif()

cpp/cmake/modules/FindPostgres.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ include(ExternalProject)
33

44
# Define PostgreSQL versions
55
set(postgres_versions
6-
"REL_16_0"
76
"REL_17_0"
87
"REL_18_0"
98
)
109

1110
# Define corresponding SHA256 checksums for each version
1211
set(postgres_SHA256_CHECKSUMS
13-
"37851d1fdae1f2cdd1d23bf9a4598b6c2f3f6792e18bc974d78ed780a28933bf"
1412
"16912fe4aef3c8f297b5da1b591741f132377c8b5e1b8e896e07fdd680d6bf34"
1513
"b155bd4a467b401ebe61b504643492aae2d0836981aa4a5a60f8668b94eadebc"
1614
)
@@ -47,6 +45,5 @@ foreach(postgres_version IN LISTS postgres_versions)
4745
)
4846
endforeach()
4947

50-
set(postgres_INSTALL_DIR_REL_16_0 ${DEFAULT_PARENT_DIR}/.ext/postgres-REL_16_0/install)
5148
set(postgres_INSTALL_DIR_REL_17_0 ${DEFAULT_PARENT_DIR}/.ext/postgres-REL_17_0/install)
5249
set(postgres_INSTALL_DIR_REL_18_0 ${DEFAULT_PARENT_DIR}/.ext/postgres-REL_18_0/install)

cpp/deeplake_pg/pg_version_compat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#pragma once
22

3-
#define PG_VERSION_NUM_16 160000
43
#define PG_VERSION_NUM_17 170000
54
#define PG_VERSION_NUM_18 180000
65

cpp/deeplake_pg/table_am.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ bool deeplake_scan_analyze_next_tuple(
313313
return true;
314314
}
315315

316-
#if PG_VERSION_NUM >= PG_VERSION_NUM_17
317316
bool deeplake_scan_analyze_next_block(TableScanDesc scan, ReadStream* stream)
318317
{
319318
DeeplakeScanData* scan_data = get_scan_data(scan);
@@ -349,7 +348,6 @@ bool deeplake_scan_analyze_next_block(TableScanDesc scan, ReadStream* stream)
349348

350349
return true; // Indicate we have data to process
351350
}
352-
#endif
353351

354352
double deeplake_index_build_range_scan(Relation heap_rel,
355353
Relation index_rel,
@@ -657,9 +655,7 @@ void deeplake_table_am_routine::initialize()
657655
routine.relation_size = deeplake_relation_size;
658656
routine.relation_estimate_size = deeplake_estimate_rel_size;
659657
routine.scan_analyze_next_tuple = deeplake_scan_analyze_next_tuple;
660-
#if PG_VERSION_NUM >= PG_VERSION_NUM_17
661658
routine.scan_analyze_next_block = deeplake_scan_analyze_next_block;
662-
#endif
663659

664660
routine.parallelscan_initialize = parallelscan_initialize;
665661
routine.parallelscan_estimate = parallelscan_estimate;

postgres/scripts/build_deb.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ usage() {
4242
echo -e " repository: Repository directory path"
4343
echo -e " architecture: amd64 or arm64"
4444
echo -e " gpg-keyid: GPG key ID for signing"
45-
echo -e " supported-versions: Comma-separated PostgreSQL versions (e.g., 16,17,18)"
45+
echo -e " supported-versions: Comma-separated PostgreSQL versions (e.g., 17,18)"
4646
echo -e "\nExamples:"
47-
echo -e " bash $0 4.4.4-1 /tmp/repo arm64 1F8B584DBEA11E9D 16,17,18"
48-
echo -e " bash $0 /tmp/repo arm64 1F8B584DBEA11E9D 16,17,18 # Auto-detect version"
47+
echo -e " bash $0 4.4.4-1 /tmp/repo arm64 1F8B584DBEA11E9D 17,18"
48+
echo -e " bash $0 /tmp/repo arm64 1F8B584DBEA11E9D 17,18 # Auto-detect version"
4949
}
5050

5151
# Error handling function

postgres/scripts/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ check_postgres() {
6363
if command_exists psql; then
6464
psql_version=$(psql -V | awk '{print $3}' | cut -d'.' -f1)
6565
case "$psql_version" in
66-
14 | 15 | 16 | 17)
66+
17 | 18)
6767
log "PostgreSQL version $psql_version detected."
6868
;;
6969
*)
70-
handle_error 1 "Unsupported PostgreSQL version: $psql_version. Only versions 14, 15, 16, and 17 are supported."
70+
handle_error 1 "Unsupported PostgreSQL version: $psql_version. Only versions 17 and 18 are supported."
7171
;;
7272
esac
7373
else

scripts/build_pg_ext.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
Usage: python3 scripts/build_pg_ext.py prod #Release build
1212
Usage: python3 scripts/build_pg_ext.py debug --deeplake-shared #Debug build with shared deeplake_api linking
1313
Usage: python3 scripts/build_pg_ext.py debug --deeplake-static #Debug build with static deeplake_api linking (force)
14-
Usage: python3 scripts/build_pg_ext.py dev --pg-versions 16,17,18 #Build for PostgreSQL 16, 17, and 18
15-
Usage: python3 scripts/build_pg_ext.py dev --pg-versions 16 #Build for PostgreSQL 16 only
14+
Usage: python3 scripts/build_pg_ext.py dev --pg-versions 17,18 #Build for PostgreSQL 17 and 18
15+
Usage: python3 scripts/build_pg_ext.py dev --pg-versions 17 #Build for PostgreSQL 17 only
1616
Usage: python3 scripts/build_pg_ext.py prod --pg-versions all #Build for all supported PostgreSQL versions
1717
"""
1818

@@ -141,7 +141,7 @@ def run(mode: str, incremental: bool, deeplake_link_type: str = None, pg_version
141141

142142
# Add PostgreSQL version options if specified
143143
if pg_versions is not None:
144-
supported_versions = {16, 17, 18}
144+
supported_versions = {17, 18}
145145
# Set all versions to OFF by default
146146
for ver in supported_versions:
147147
if ver in pg_versions:
@@ -234,20 +234,20 @@ def write_mode(mode: str):
234234
i += 1
235235
elif arg == "--pg-versions":
236236
if i + 1 >= len(sys.argv):
237-
raise Exception("--pg-versions requires a value (e.g., '16,17,18' or 'all')")
237+
raise Exception("--pg-versions requires a value (e.g., '17,18' or 'all')")
238238
versions_str = sys.argv[i + 1]
239239
if versions_str == "all":
240-
pg_versions = [16, 17, 18]
240+
pg_versions = [17, 18]
241241
else:
242242
try:
243243
pg_versions = [int(v.strip()) for v in versions_str.split(',')]
244244
# Validate versions
245-
supported = {16, 17, 18}
245+
supported = {17, 18}
246246
invalid = set(pg_versions) - supported
247247
if invalid:
248248
raise Exception(f"Invalid PostgreSQL versions: {invalid}. Supported: {supported}")
249249
except ValueError:
250-
raise Exception(f"Invalid --pg-versions format: '{versions_str}'. Use comma-separated numbers (e.g., '16,17,18') or 'all'")
250+
raise Exception(f"Invalid --pg-versions format: '{versions_str}'. Use comma-separated numbers (e.g., '17,18') or 'all'")
251251
i += 2
252252
else:
253253
raise Exception(f"Invalid option '{arg}'. Use --deeplake-shared, --deeplake-static, or --pg-versions")

0 commit comments

Comments
 (0)