GithubHelp home page GithubHelp logo

Comments (3)

samay-sharma avatar samay-sharma commented on May 18, 2024

Hey @besquared,

Thanks for reporting this. This is a known issue and requires changes to CitusDB's \stage command to fix. We intend to fix it with the next release of CitusDB as mentioned at https://github.com/citusdata/cstore_fdw/wiki/Roadmap.

For now, to use the develop branch with the current CitusDB version, you would need to specify the filename option with a valid file path (for example:- $PGDATA/cstore_fdw/customer_reviews.cstore). Then, the \stage command should work as expected. Please let us know if this fixes the issue.

Also, the master branch should work with the current CitusDB version.

from cstore_fdw.

samay-sharma avatar samay-sharma commented on May 18, 2024

We started looking into this issue. The reason for this error is that in while running the \stage command, CitusDB sends a ALTER FOREIGN TABLE tablename OPTIONS (SET filename 'pg_foreign_file/cached/master_table_name_shardid’') query to set the cstore_fdw file name on the worker node shard on the remote node. This fails with error "option "filename" not found" when filename was not specified in the create table.

There are two possible fixes to this issue:-
Alternative 1:
(i) We error out if filename is specified for distributed tables. This is to make it clear that CitusDB will determine its own remote filename while staging distributed columnar tables.
(ii) We change the ALTER FOREIGN TABLE command to ADD the filename option instead of SET.

If we choose this approach, the filename path for the columnar store would be DIRECTORY_PATH/master_table_name_shardid on all worker nodes. This is inconsistent with the paths we now automatically pick in cstore_fdw, which are of the form DIRECTORY_PATH/local_relation_id.

Another disadvantage of this alternative is that the \stage command still determines the cstore remote file path which it does not need to. The only need for the \stage command to know the filename is to determine file size (to be used as the shard size), which can now be calculated using the cstore_table_size UDF.

Alternative 2:
(i) We error out if filename is specified for distributed tables. This is to make it clear that CitusDB will determine its own remote filename while staging distributed columnar tables.
(ii) We let cstore_fdw automatically choose the file path by not specifying any path manually and determine the table size by using the cstore_table_size() function.

I think the 2nd approach is better as it allows the CitusDB \stage logic to be de-coupled from managing remote cstore_fdw files and makes cstore_fdw behaviour more similar to normal tables.

from cstore_fdw.

pykello avatar pykello commented on May 18, 2024

This has been fixed internally in CitusDB and will be released in the next version.

from cstore_fdw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.