graphile / graphile/graphile.github.io
[Solved] Error: "Prepared statement ... already exists" when repeating query
- Lenguaje dominante
- SCSS
- Estrellas
- 27
- Forks
- 126
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I just tried the default docker image with Digital Ocean's hosted Postgres (which recommends using connection pools), and ran into the error "Prepared statement ... already exists" when repeating the same query.
@benjie quickly pointed out the following on Discord:
> PostGraphile uses prepared statements as a minor performance optimisation, but this causes issues if you’re running external connection pools in addition to PostGraphile’s native connection pooling. You can disable prepared statements by setting the environment variable POSTGRAPHILE_PREPARED_STATEMENT_CACHE_SIZE=0
In my case, since PostGraphile already has connection pools built-in, I just connected directly to the database rather than the Postgres connection pool, and everything works fine.
I wasn't sure where this might go in the documentation, so just quickly posting this as an issue in case it helps anyone.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start with the issue body, which documents the prepared-statement error when using an external Postgres connection pool alongside PostGraphile. No documentation file or test is named, so first locate the relevant connection-pooling or configuration documentation. Done means the workaround using POSTGRAPHILE_PREPARED_STATEMENT_CACHE_SIZE=0 and the direct-database connection guidance are clearly documented.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, postgresql
- Área
- databases, documentation
- Tipo de issue
- Documentación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100