ねえ、リリース環境で発生したエラーの正確な原因を特定するのに少し苦労しています。Google では、この特定のエラーをあまり扱っていないようです。
これは私たちが得ているエラーメッセージです:
SQLSTATE[34000]: 無効なカーソル名: 7 エラー: ポータル "" が存在しません
エラーは、PDO プリペアド ステートメントを使用している場合にのみ表示されます。
これは、リリース環境のセットアップです。
- pgpool 3.0.1 (postgresql バックエンドはストリーミング レプリケーション モードです!)
- PHP5.3.5
- PostgreSQL 9.0
編集: アーキテクチャは 64 ビットです。
私たちのテスト環境では同じエラーは発生しません (編集: 言及するのを忘れていました。標準のテスト環境では、pgpool なしで Postgresql 9.0 を使用しています)。したがって、pgpool が少なくとも部分的に疑わしいと思われます。
このエラーの考えられる原因を知っている人はいますか?
編集: OK、エラーの原因となるコードの例を次に示します。
$sql = 'SELECT * ';
$sql .= 'FROM "myTable" as "myStuff" ';
$sql .= 'WHERE "myTable"."status" = 1 ';
$sql .= 'AND "myTable"."myTableId" = :tableId ';
$sth = $this->_db->prepare($sql);
$sth->bindParam(':tableId', $tableId, PDO::PARAM_INT);
$sth->execute();
編集:いくつかのログファイル出力。
Postgresql:
postgresql-Sun.log-129- ORDER BY "id"
postgresql-Sun.log:130:ERROR: portal "" does not exist
postgresql-Sun.log-131-ERROR: prepared statement "pdo_stmt_00000011" does not exist
postgresql-Sun.log-132-STATEMENT: DEALLOCATE pdo_stmt_00000011
postgresql-Mon.log-82- where "id" = 32024
postgresql-Mon.log:83:ERROR: portal "" does not exist
postgresql-Mon.log-84-ERROR: prepared statement "pdo_stmt_00000002" does not exist
postgresql-Mon.log-85-STATEMENT: DEALLOCATE pdo_stmt_00000002
pgpool:
LOG: pid 22071: Replication of node:1 is behind 2080 bytes from the primary server (node:0)
LOG: pid 22071: Replication of node:2 is behind 2080 bytes from the primary server (node:0)
LOG: pid 13499: pool_send_and_wait: Error or notice message from backend: : DB node id: 0 backend pid: 8470 statement: message: portal "" does not exist
LOG: pid 13499: pool_send_and_wait: Error or notice message from backend: : DB node id: 0 backend pid: 8470 statement: DEALLOCATE pdo_stmt_00000003 message: prepared statement "pdo_stmt_00000003" does not exist