Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table jackson_ttl missing with default configuration #1572

Open
shuther opened this issue Jul 30, 2024 · 4 comments
Open

table jackson_ttl missing with default configuration #1572

shuther opened this issue Jul 30, 2024 · 4 comments

Comments

@shuther
Copy link

shuther commented Jul 30, 2024

Just starting the template,

in .env I have:

DATABASE_URL=postgresql....
# default value for AUTH_PROVIDERS, not sure how the app behaves in this situation
AUTH_PROVIDERS=

npx prisma db push did not return any error.

I am able to signup an account, but when I click on Settings/Single Sign-On, I have the error below:

query failed: SELECT "table_schema", "table_name", obj_description(('"' || "table_schema" || '"."' || "table_name" || '"')::regclass, 'pg_class') AS table_comment FROM "information_schema"."tables" WHERE ("table_schema" = 'public' AND "table_name" = 'jackson_store') OR ("table_schema" = 'public' AND "table_name" = 'jackson_index') OR ("table_schema" = 'public' AND "table_name" = 'jackson_ttl')
error: error: relation "public.jackson_ttl" does not exist
Recording is off, propagating context in a non-recording span
error connecting to engine: sql, type: postgres db: QueryFailedError: relation "public.jackson_ttl" does not exist

I would have expected the tables to be setup.

@niwsa
Copy link
Member

niwsa commented Jul 30, 2024

@shuther What version of postgres are you running ?

@shuther
Copy link
Author

shuther commented Aug 2, 2024

I used the managed service offer (free for now) from https://xata.io/; my guess is that something was missing during the migration. happy to start again from a fresh start if I can help you to debug it?

@niwsa
Copy link
Member

niwsa commented Aug 2, 2024

How did you run the migration ?

@shuther
Copy link
Author

shuther commented Aug 5, 2024

I found the problem, the error message was misleading (the table exists); and I am not sure if the problem is on the xata side, prisma or somewhere else.
pg_catalog.obj_description is expected an OID as per postgres16 doc , but it is called using ('"' || "table_schema" || '"."' || "table_name" || '"') and it seems to work ok. However the cast (:regclass) is not accepted when it is called in a particular way. I tested it with cast(xxx as regclass) but not sucess neither.

pg_catalog.obj_description('public.jackson_ttl'::regclass, 'pg_class') is working.
pg_catalog.obj_description('"public"."jackson_ttl"'::regclass, 'pg_class') is also working
('"' || "table_schema" || '"."' || "table_name" || '"')::regclass as c is NOT working

I will open a bug with xata as it sounds an issue with their postgresql server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants