Important announcement: Columnar storage is now part of Citus

75 views
Skip to first unread message

Marco Slot

unread,
Mar 8, 2021, 3:57:38 AM3/8/21
to cstore users
Hi all, 
I wanted to share an important announcement for cstore_fdw users:

Columnar storage is now part of the Citus extension, which uses the table access method API to give a much more native experience. It also supports streaming replication, archival, rollback, and simplifies pg_upgrade. You can use Citus just for columnar storage on a single PostgreSQL server, or combine it with distributed tables to parallelize queries locally or across a cluster of PostgreSQL servers.

Migration is simple, and you'll typically see improved compression:

-- After adding adding shared_preload_libraries = 'citus'
-- to postgresql.conf and restarting:

CREATE EXTENSION IF NOT EXISTS citus;

-- Create a table using the columnar access method, with the same columns
-- as an existing cstore_fdw table

CREATE TABLE customer_reviews_am (
  LIKE customer_reviews_fdw INCLUDING ALL
) USING columnar;

-- Copy data from a cstore_fdw table to a Citus columnar table
INSERT INTO customer_reviews_am SELECT * FROM customer_reviews_fdw;

-- cstore_fdw data size
SELECT pg_size_pretty(cstore_table_size('customer_reviews_fdw'));
┌────────────────┐
│ pg_size_pretty │
├────────────────┤
│ 100 MB         │
└────────────────┘

-- Citus Columnar data size
SELECT pg_size_pretty(pg_table_size('customer_reviews_am'));
┌────────────────┐
│ pg_size_pretty │
├────────────────┤
│ 64 MB          │
└────────────────┘

Read more about it in the Citus columnar blog post by Jeff Davis.

cheers,
Marco

Martin Loetzsch

unread,
Mar 10, 2021, 3:56:17 PM3/10/21
to Marco Slot, cstore users
Thanks Marco,

this is really great news. We use cstore_fdw a lot for serving flat fat fact tables to Tableau, PowerBI, Metabase and other front ends and in the last half year it has been quite some pain to get it working (mainly because of the missing PG 13 compatibility).

I tried the Citus extension today and it works like a charm.

Thanks again for doing this,

Martin
Dr. Martin Loetzsch
Project A | Chief Data Officer


Project A Services GmbH & Co. KG
Julie-Wolfthorn-Straße 1, 10115 Berlin
Amtsgericht Charlottenburg HRA 51487 B
Managing Directors:
Rainer Berak, Benjamin Fischer, Dr. Florian Heinemann, 
Uwe Horstmann, Thies Sander, Dr. Anton Waitz

--
You received this message because you are subscribed to the Google Groups "cstore users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cstore-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cstore-users/6fe88d23-bfbf-4ccc-9f4d-edd66e413885n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages