graphile / graphile/graphile.github.io

[Solved] Error: "Prepared statement ... already exists" when repeating query

オープン
#280 コメント 2 件 リアクション 5 件 担当者 0 名 GitHub で見る
主要言語
SCSS
スター
27
フォーク
126
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, postgresql
領域
databases, documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。