vidardb / pgrocks-fdw

Bring RocksDB to PostgreSQL as an extension. It is the first foreign data wrapper (FDW) that introduces LSM-tree into PostgreSQL. The underneath storage engine can be RocksDB. The FDW also serves for VidarDB engine, a versatile storage engine for various workloads. See the link for more info about VidarDB engine.
https://www.vidardb.com
Apache License 2.0
122 stars 12 forks source link

Would it make more sense to make RocksDB a table AM instead of a FDW? #25

Closed davidfetter closed 4 years ago

davidfetter commented 4 years ago

https://www.postgresql.org/docs/devel/tableam.html

jsc0218 commented 4 years ago

Hi David, thanks for coming here and giving suggestion. One hesitation for me to use AM instead of FDW, (please confirm it is true or not), AM has to store all data in table instead of all in index. We wish we can put all data in the index. Otherwise, AM method is more promising for us.

davidfetter commented 4 years ago

Thanks for getting back to me on this. There are also index AMs. If you want to store the data in indexes, they might be a good fit. https://www.postgresql.org/docs/devel/indexam.html

jsc0218 commented 4 years ago

Cool! Seems exactly what we need! I will carefully read the doc. Appreciated.

jsc0218 commented 4 years ago

After reading the doc and related presentations as well as ZomboDB's implementation, I finally figure out the exact difference between table AM, index AM and FDW. The ultimate best choice for us should be table AM as you suggested. But we will wait for more table AM implementations and then do the migration.