Hi all, I'm getting the following error while associating Database server to default Index, I'm using PostgreSQL:

PDOException: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block: SELECT r.filename AS filename FROM {registry} r WHERE (r.name ILIKE :db_condition_placeholder_0) AND (r.type = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => SearchApiException [:db_condition_placeholder_1] => interface ) in _registry_check_code() (linea 3175 di /home/xxx/public_html/includes/bootstrap.inc).

Anyone?

Comments

m.dibenedetto created an issue. See original summary.

m.dibenedetto’s picture

Issue summary: View changes
drunken monkey’s picture

Project: Search API Database Search » Drupal core
Version: 7.x-1.5 » 7.x-dev
Component: Code » postgresql db driver
Assigned: m.dibenedetto » Unassigned

Thanks for reporting, and sorry it took a while for me to get back to you.
To me, this looks more like a problem in Drupal's PostgreSQL driver. It seems if you abort a transaction, the registry cannot look up classes anymore – which would be a bug in that system, I'd say.
However, I'm not even sure how this would be triggered in this case – it doesn't even seem like we have any transaction/rollback in the code, and all the code that would have them doesn't use the SearchApiException class, as far as I can see.
Anyways, I'm for now moving this to the Drupal Core issue queue for feedback.

Ashok Negi’s picture

I exported a search server with Features and tried assigning this server to the default node index. I am getting the same error message:

PDOException: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block: SELECT r.filename AS filename FROM {registry} r WHERE (r.name ILIKE :db_condition_placeholder_0) AND (r.type = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => SearchApiException [:db_condition_placeholder_1] => trait ) in _registry_check_code() (line 3483 of /var/www/html/includes/bootstrap.inc).

I am using seach_api_db with PostgreSQL.

@drunken monkey - Any guidelines you can provide, much appreciated.

drunken monkey’s picture

No, sorry, I'm pretty clueless here. It also doesn't seem at all obvious how to even trigger that error.
Maybe when te database structure is changed (creating/altering/dropping tables) during a transaction? Does that maybe cause problems in Postgres?
I know it caused problems in MySQL, though I'm pretty sure it got fixed there already. Unfortunate that we don't have any Postgres test coverage in D7.