From f453b1388966df3751729ce922c251efaeba355b Mon Sep 17 00:00:00 2001 From: Mytherin Date: Mon, 10 Nov 2025 16:50:08 +0100 Subject: [PATCH 1/2] Automatically turn on text protocol when connecting to redshift --- src/include/postgres_version.hpp | 2 +- src/postgres_connection.cpp | 6 +++++- src/postgres_scanner.cpp | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/include/postgres_version.hpp b/src/include/postgres_version.hpp index 2e52fe796..d26b0526a 100644 --- a/src/include/postgres_version.hpp +++ b/src/include/postgres_version.hpp @@ -12,7 +12,7 @@ namespace duckdb { -enum class PostgresInstanceType { UNKNOWN, POSTGRES, AURORA }; +enum class PostgresInstanceType { UNKNOWN, POSTGRES, AURORA, REDSHIFT }; struct PostgresVersion { PostgresVersion() { diff --git a/src/postgres_connection.cpp b/src/postgres_connection.cpp index 67ef0813c..09ce8aec1 100644 --- a/src/postgres_connection.cpp +++ b/src/postgres_connection.cpp @@ -128,10 +128,14 @@ PostgresVersion PostgresConnection::GetPostgresVersion() { version.type_v = PostgresInstanceType::UNKNOWN; return version; } - auto version = PostgresUtils::ExtractPostgresVersion(result->GetString(0, 0)); + auto pg_version_string = result->GetString(0, 0); + auto version = PostgresUtils::ExtractPostgresVersion(pg_version_string); if (result->GetInt64(0, 1) > 0) { version.type_v = PostgresInstanceType::AURORA; } + if (StringUtil::Contains(pg_version_string, "Redshift")) { + version.type_v = PostgresInstanceType::REDSHIFT; + } return version; } diff --git a/src/postgres_scanner.cpp b/src/postgres_scanner.cpp index 54af70c63..74315b860 100644 --- a/src/postgres_scanner.cpp +++ b/src/postgres_scanner.cpp @@ -130,6 +130,9 @@ void PostgresScanFunction::PrepareBind(PostgresVersion version, ClientContext &c } bind_data.SetTablePages(approx_num_pages); bind_data.version = version; + if (version.type_v == PostgresInstanceType::REDSHIFT) { + bind_data.use_text_protocol = true; + } } PostgresBindData::PostgresBindData(ClientContext &context) { From f36221afbe4a3f5e23b7246ec7a02facd046571f Mon Sep 17 00:00:00 2001 From: Mytherin Date: Mon, 10 Nov 2025 20:14:29 +0100 Subject: [PATCH 2/2] Remove disk space --- .github/workflows/Linux.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml index 707e6cc13..fadfab375 100644 --- a/.github/workflows/Linux.yml +++ b/.github/workflows/Linux.yml @@ -27,6 +27,18 @@ jobs: VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake steps: + - name: Free disk space 1 + uses: endersonmenezes/free-disk-space@v2.1.1 + continue-on-error: true + with: +# remove_android: true # ~9.5GB in #52s +# remove_dotnet: true + remove_haskell: true # ~6.5GB in ~3s + remove_tool_cache: true # ~4.8GB in ~17s +# remove_swap: true +# remove_packages_one_command: true # ~7.5 GB in ~94s + testing: false + - name: Install required ubuntu packages run: | sudo apt-get update -y -qq