pgbouncer=true flag not working as expected with a relation and enums on both sides of the relations
See original GitHub issueBug description
Related thread https://github.com/prisma/prisma-client-js/issues/651#issuecomment-652439460
Using DigitalOcean Connection Pools
Connection String
postgresql://xxxxxxx:xxxxxxx@xxxxxxx:25061/Pool?sslmode=require&pgbouncer=true&schema=xxxxx
How to reproduce
- Create new DO managed postgres db
- Deploy Prisma schema (without pgbouncer)
- Add connection pool
- Connect using the connection pool string above (with pgbouncer)
- Run app/prisma studio - execute 3 or 4 actions
Results in this error:
Error: Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("26000"), message: "prepared statement \"s162\" does not exist", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("prepare.c"), line: Some(512), routine: Some("FetchPreparedStatement") }) }) })
at PrismaClientFetcher.request (/Users/aaron/.cache/prisma/studio/Users-aaron-Desktop-Ember/runtime/index.js:1:185866)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Prisma information
Fairly large schema (can’t share specifics) Using nexus/schema (although reproducible in prisma studio also)
Environment & setup
- OS: Mac OS
- Database: PostgreSQL
- Prisma version: 2.1.3
- Node.js version: 12.16.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Flags Enum.HasFlag not Working as Expected for Multiple bit ...
I suggest that you eschew HasFlag and just do it directly using bit operations: var myFilteredListMultiple = MyMainList.Where(w => (w.
Read more >How To Use Enums in TypeScript - DigitalOcean
Using Bit Flags with TypeScript Enums Bit flags are a way to represent different boolean-like options into a single variable, by using bitwise ......
Read more >Enum Mappings with Hibernate - The Complete Guide
Let me show you how to use Hibernate's standard enum mappings, create a flexible, custom mapping and map db-specific enum types.
Read more >Build Enumerations of Constants With Python's Enum
In this tutorial, you'll learn how to: Create enumerations of constants using Python's Enum class; Work with enumerations and their members in ...
Read more >Enum, Flags and bitwise operators - Alan Zucconi
What if we are using a melee weapon with a fire attack (a fire sword?!)? To solve this problem, enums can be decorated...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you @aarshaw for sharing the schema based on the information we were able to create an isolated minimal reproduction: https://github.com/divyendu-test/prisma-2907
This has something to do with a relation and enums on both sides of the relations used in conjunction with pgbouncer.
Related issue: https://github.com/prisma/prisma/issues/2921
Thank you, is it possible for you to share your schema and some seed data at
schemas@prisma.io
. We are happy to sign an NDA if you want. With that, a minimal reproduction would be much easier for us.