-
Notifications
You must be signed in to change notification settings - Fork 51
Please add support for AWS Redshift (based on PostgreSQL 8.0.2) #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Would LOVE to see this happen (especially if the version check is the only real blocker) |
…fault to unknown version
I've modified the version check to use |
@Mytherin I downloaded and built from source, but am running into an issue when invoking
This happens both in I'll figure it out then confirm the logical fix. |
Fix #181 - use version() instead, and if version query fails default to unknown version
I've merged it into main - you should be able to get a nightly build for v0.10.1 after CI completes (in ~1 hour maybe?) with the following command: force install postgres_scanner from 'http://nightly-extensions.duckdb.org'; |
@Mytherin Success! ATTACH succeeds, no errors :) Unfortunately I can't 1. introspect the schema (via
If this is something you'd like to pursue supporting, LMK if you'd like additional details here or in a new ticket. |
I've pushed a fix for that here - #197 - that should disable |
@Mytherin Close! But no cigar.
I feel this'll be a bit of a yak-shaving exercise. I don't think RedShift supports PG's |
Unfortunately this is harder to solve - all of the current result conversion code is written for the binary copy. In order to solve this we would need to make an alternative result conversion function that uses the (regular) text protocol and add support for that for all data types. I will leave the issue open for now as I don't have time to pick this up at this point. |
@Mytherin Very appreciated. Thank you. Was hoping for quick wins, but I completely understand where it's at now. Also (thinking out loud): |
That makes sense - although data transfer can always be useful even if the performance is not fantastic. We do also support the postgres_query method. |
@Mytherin so is it possible to use the PostgreSQL Extension and copy command with redshift? https://duckdb.org/docs/extensions/postgres#running-sql-queries-in-postgres-with-postgres_query |
@misteliy You can test it, but my hunch based on the above is that it's not yet possible to transfer real data from redshift over the wire to the duckdb instance. |
I've recently tried using DuckDB (with postgres_scanner extension) to work with a Redshift instance: it attaches the DB correctly, can list its tables and describe them - but a simple In my case I'd need to periodically query/dump data locally for ad-hoc analyses, even having basic querying working would be quite useful to automate my workflow. Have there been any developments on Redshift support? EDIT The workaround I found so far is to UNLOAD data from Redshift to Parquet on S3 (using ODBC) and then using DuckDB to query the Parquet files. |
The AWS Sagemaker Lakehouse setup might bring some changes, but I still believe Redshift support through Postgres would be really useful, especially for low-latency analytics use cases (rather than traditional big data scenarios with Redshift). It would offer the best of both worlds. |
What happens?
When I try to use the postgres extension with AWS Redshift I get an error message:
Based on https://stackoverflow.com/questions/51422236/what-role-permission-needed-for-the-user-to-get-the-server-version-in-amazon-red
I can use
SELECT version();
on Redshift.This appears to be caused by the query here:
https://github.com/duckdb/postgres_scanner/blob/883a8f1a8a487264855a5166f7df1f46ad386434/src/postgres_connection.cpp#L122
To Reproduce
OS:
Ubuntu 22.04 LTS
PostgreSQL Version:
Redshift (based on PostgreSQL 8.0.2)
DuckDB Version:
v0.10.0 20b1486d11
DuckDB Client:
CLI
Full Name:
Cedric Yau
Affiliation:
LinebackerData
Have you tried this on the latest
main
branch?Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
The text was updated successfully, but these errors were encountered: