嘿,我正在努力确定在我们的发布环境中出现的错误的确切原因。在谷歌上似乎没有太多处理这个特定错误。
这是我们收到的错误消息:
SQLSTATE[34000]:游标名称无效:7 错误:门户“”不存在
仅当我们使用 PDO 准备语句时才会弹出错误。
这是我们发布环境的设置:
- pgpool 3.0.1(postgresql 后端处于流复制模式!)
- PHP 5.3.5
- PostgreSQL 9.0
编辑:架构是 64 位的。
在我们的测试环境中没有出现同样的错误(编辑:忘了提,标准测试环境使用没有 pgpool 的 Postgresql 9.0)。因此,我怀疑 pgpool 至少部分是可疑的。
有谁知道这个错误的可能原因是什么?
编辑:好的,这是导致错误的代码类型的示例。
$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