Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
wuputah committed Apr 18, 2024
1 parent 2b74f70 commit a020bfc
Showing 1 changed file with 35 additions and 23 deletions.
58 changes: 35 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,51 @@
# 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 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.
* [ ] Build a cloud storage backend for the columnar datastore that provides "bottomless"
storage with a local cache.
* [ ] 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.

0 comments on commit a020bfc

Please sign in to comment.