Can multiple postgres databases use the same cstore_fdw?

68 views
Skip to first unread message

Alex

unread,
Oct 16, 2019, 9:57:24 AM10/16/19
to cstore users
I assume this may be possible since it is a foreign data wrapper.
My use case is migrating/copying a database.
I want to avoid copying the 70T of data in cstore if possible.
There will be a period of time where both databases are up and running.

If this is actually possible does the answer change if one postgres database is latin1 and the other (new) database is utf8?

Thanks.
Alex

Murat Tuncer

unread,
Oct 16, 2019, 3:53:55 PM10/16/19
to Alex, cstore users
Yes it is possible, but I do not recommend it. You might end up corrupting data if both databases attempt to write.

try using postgres_fdw from second database to connect to cstore_fdw table in the first instance.

If you must use the same data, 
- first make sure that you have not done any alter table add/drop column commands on the original table. cstore data layout is sensible to those changes. 
- make sure source and destination databases have the same PG version. 
- you can then create cstore table on the second database using filename option to point cstore table storage to the original table.

I would first test this with a different table few times before doing this on the real data. Try dropping columns in the middle after inserting some data. See if you can detect that columms were dropped. 



--
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/1039f097-536e-41d1-b4b0-b681c1918218%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages