Skip to content

Commit e598424

Browse files
committed
Merge remote-tracking branch 'origin/main' into serverless
2 parents 6908aec + 12b501e commit e598424

11 files changed

Lines changed: 19 additions & 36 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/extension_init.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,6 @@ static void process_utility(PlannedStmt* pstmt,
642642
}
643643
}
644644
}
645-
646-
// DROP SCHEMA propagation is handled by DDL WAL logging post-hook.
647645
}
648646
} else if (stmt->removeType == OBJECT_DATABASE) {
649647
const char* query = "SELECT nspname, relname "

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/sync_worker.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ extern "C" {
3232
#include "table_storage.hpp"
3333
#include "utils.hpp"
3434

35+
#include <async/promise.hpp>
36+
#include <deeplake_api/catalog_table.hpp>
37+
#include <icm/vector.hpp>
38+
3539
#include <algorithm>
3640
#include <cstdio>
3741
#include <cstring>
@@ -550,7 +554,6 @@ PGDLLEXPORT void deeplake_sync_worker_main(Datum main_arg)
550554
std::unordered_map<std::string, int64_t> last_db_seqs;
551555
load_wal_checkpoints(last_db_seqs);
552556

553-
554557
while (!got_sigterm) {
555558
// Process pending interrupts (including ProcSignalBarrier from DROP DATABASE)
556559
CHECK_FOR_INTERRUPTS();

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;

cpp/deeplake_pg/table_storage.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,6 @@ void table_storage::save_table_metadata(const pg::table_data& table_data)
240240
}
241241
return true;
242242
});
243-
244-
// Stateless sync uses DDL WAL replay from __wal_table.
245243
}
246244

247245
void table_storage::load_table_metadata()
@@ -855,8 +853,6 @@ void table_storage::drop_table(const std::string& table_name)
855853
auto& table_data = get_table_data(table_name);
856854
auto creds = session_credentials::get_credentials();
857855

858-
// Stateless propagation is handled by DDL WAL logging in ProcessUtility hook.
859-
860856
try {
861857
table_data.commit(); // Ensure all changes are committed before deletion
862858
table_version_tracker::drop_table(table_data.get_table_oid());

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

0 commit comments

Comments
 (0)