-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,49 @@ | ||
# pg_quack | ||
|
||
pg_quack is PostgreSQL with Embedded DuckDB :duck: | ||
quack is a PostgreSQL extension that embeds DuckDB into Postgres. :duck: | ||
|
||
## Installation | ||
Once loaded, DuckDB is used for all read queries unless disabled. In the future, more options will be available. | ||
|
||
## Status | ||
|
||
### With pgxman | ||
This project is pre-alpha. It is not currently suitable for production. | ||
|
||
1. [Install pgxman](https://pgxman.com/) | ||
1. `pgxman install pg_quack` | ||
## Roadmap | ||
|
||
### From source | ||
This is a high-level early roadmap, subject to change. In the near future, we will provide a more detailed roadmap | ||
via a Github Project. | ||
|
||
1. `make install` | ||
1. (Optional) Create quack directory and set permissions so PostgreSQL process can write to it. | ||
Directory can be changed with `quack.data_dir` configuration parameter. By default, the | ||
directory is `quack` in your Postgres data directory. | ||
* [ ] Allow DuckDB to read from heap tables. This gives a stable reference implementation and stable | ||
testing for query execution, as well as the capability to read from heap tables for joins. | ||
* [ ] Implement a pluggable storage API to allow DuckDB to read from a variety of Postgres | ||
(or even non-Postgres) storage methods. This API will allow implementors to bypass Postgres | ||
to connect data directly to DuckDB. | ||
* [ ] Allow quack to read from any implemented Postgres table access method. | ||
* [ ] Implement a columnar datastore that supports concurrent access, is MVCC-capable and ACID-compliant, | ||
and can be backed by cloud storage. Connect this datastore to DuckDB for reads and Postgres | ||
for writes. | ||
* [ ] Be able to intelligently execute queries via DuckDB or Postgres based on query plan or other | ||
factors. | ||
|
||
## Installation | ||
|
||
``` | ||
postgres=# show quack.data_dir ; | ||
quack.data_dir | ||
------------------------------------ | ||
/opt/database/postgres/data/quack/ | ||
(1 row) | ||
make install | ||
``` | ||
|
||
Prerequisites: | ||
|
||
* Postgres 16 | ||
* Ubuntu 22.04 or MacOS | ||
* Standard set of build tools for building Postgres extensions | ||
* [Build tools that are required to build DuckDB](https://duckdb.org/docs/dev/building/build_instructions) | ||
|
||
## Usage | ||
|
||
Currently the extension is enabled anytime it is loaded: | ||
|
||
``` | ||
CREATE TABLE quack_test (...) USING quack; | ||
LOAD quack; | ||
``` | ||
|
||
## Limitations | ||
|
||
* PG 14 and PG 15 only (PG 16 is not yet supported) | ||
* Only COPY, INSERT, and SELECT are supported. | ||
* Only single connection can execute INSERT and SELECT against quack table | ||
* Limited support for only basic data types | ||
* You cannot query between `quack` tables and other storage methods (including Postgres `heap` tables). | ||
Then query as usual. |