Git Product home page Git Product logo

Comments (9)

ammirator-administrator avatar ammirator-administrator commented on June 13, 2024

Any help?? Citus is not usable with hasura because of this error
Can we do something about this?
It seems that just compiling Postgres may help, but that is not a option and no one is compiling his own version of postgres

from graphql-engine.

ammirator-administrator avatar ammirator-administrator commented on June 13, 2024

Is there a way to configure hasura to use not json_(..,..,..,,) witha lot of arguments but use maybe json_array not json_object which causes this problem

from graphql-engine.

ammirator-administrator avatar ammirator-administrator commented on June 13, 2024

More context about the issue I also fount heer https://postgrespro.com/list/thread-id/2486891
Basically the same issue

from graphql-engine.

ammirator-administrator avatar ammirator-administrator commented on June 13, 2024

If i use in my databases.yaml
this

kind: postgres
instead of

kind: citus
Then everything works, but I just simply do not know if that is ok and what I lose by doing so

from graphql-engine.

happyhunter7 avatar happyhunter7 commented on June 13, 2024

+1 This is supper needed and is a limitation from Hasura

Big companies do not use just postgres since it doesn't make sense in big apps but with some extension like Citus
And if the Hasura Citus adapter implementation has these limitations it is sad for big companies which may try to us eHasura

from graphql-engine.

SamirTalwar avatar SamirTalwar commented on June 13, 2024

Can you explain how you trigger this issue? Is it a problem when loading metadata, making a query, using the Console, or something else?

There aren't that many differences between the vanilla PostgreSQL and Citus backends, so I am surprised that switching the "kind" would help, but that does narrow it down a lot.

I would also recommend checking out Hasura DDN, which fixes many of the issues in Hasura GraphQL Engine v2. Most notably in this case, the custom Citus support is strictly limited to introspection, and during queries, both PostgreSQL and Citus are treated identically.

from graphql-engine.

happyhunter7 avatar happyhunter7 commented on June 13, 2024

This is a problem when running a simple get query for example to get a row from such a table
If the table has more than 50+ columns the query fails
And yes the citus get query is different that the one used in postgres, in postgres it uses row_to_json and in citus it uses json_build_object methods
An this json_build_object cant take more than 100args this is the postgres limitation, and even if the table has only 50 columns this limitations is still reached since hasura adds there 50+ columns starting with some prefix "root...."
The implementations are different

cc @SamirTalwar

from graphql-engine.

SamirTalwar avatar SamirTalwar commented on June 13, 2024

I saw @ammirator-administrator's comments in #10229 pointing to a code location. That code is specific to subscriptions, not queries, and is not specific to Citus; it is the same code for all backends based on PostgreSQL.

Is it possible that in testing, you made a subscription to Citus, but a query to vanilla PostgreSQL? That would explain the discrepancy.

from graphql-engine.

ammirator-administrator avatar ammirator-administrator commented on June 13, 2024

Hey @SamirTalwar
I just gave a example
But the queries in citus also uses json_to_object and the problems are guess in both queries and subscription
Since I do not know any haskel code I just sent a example of where it is used and where also it may be a problem

The problem I have is in Queries, just by runing a graphql query for example get app_config_by_pk (Which is a table with more than 50columns it returns teh error)
This doesn't happen on other tables at all since these have less than 50 columns

from graphql-engine.

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.