Does cstore_fdw get around Postgres 8kb row size limit?

213 views
Skip to first unread message

Lee Hachadoorian

unread,
Jul 28, 2016, 4:36:17 PM7/28/16
to cstore users
Postgres tables are limited to 250 - 1600 columns depending on data type and whether the data types are TOASTable. One advantage to column-store databases is that they can support wide tables. Therefore:

1) Is there a hard limit to the number of columns a cstore foreign table can have?
2) Is there a row size limit (Postgres' 8kb, or another limit imposed by cstore)?

Murat Tuncer

unread,
Jul 31, 2016, 7:32:46 AM7/31/16
to cstore users
Hi Lee

1 - number of columns is limited by postgresql,  cstore_fdw itself does not impose any limits. 

2 - there is no preset limit on row size, however,  due to how cstore works,  active "stripe" has to fit in a work memory. If you are planning to use large rows you may hit out of memory issues. If that happens you can 
  • reduce number of size in a stripe. Default is 150 000 rows, you should set server option "stripe_row_count" to a lower value when creating cstore table, or
  • increase  work_mem  in postgresql configuration. Depending on how many concurrent connections you want to allow in you server you can even set it to order of GBs.

Jose Sanchez

unread,
Jun 7, 2019, 11:35:46 AM6/7/19
to cstore users
Hey Mirat,

so there is no limit in the number of columns right? as long as I have enough memory.

Thanks!

Murat Tuncer

unread,
Jun 7, 2019, 5:17:52 PM6/7/19
to Jose Sanchez, cstore users
cstore itself does not enforce a maximum but PG limits column count to  1600. 

--
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/2d58626d-e5e3-4dc5-bfe7-247f05f11106%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages