Closed (duplicate)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Framework
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2012 at 20:13 UTC
Updated:
20 May 2013 at 12:42 UTC
Installation of Kickstart RC1 fails on PostgreSQL 9.1 during the "Install Demo Store" phase. This appears to be caused by this issue: #1214846: Table names might be too long for PostgreSQL. The fix there does nothing to solve the problem, it just trims the length. There will still be collisions of similar names if they get that long.
Here's the error I get.
SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "search_api_db_product_display_field_product_commerce_price_amou" already exists
I'm not using a database prefix or suffix.
Comments
Comment #1
bendiy commentedSearch API DB is trying to stick these together and fails:
"search_api_db_product_display_" + "field_product_commerce_price_amount_float_asc"
Maybe that field name can be shortened.
Comment #2
suckerpunch commentedOne fix is to recompile Postgres.
Download and decompress the source code,
src/include/pg_config_manual.hwith theNAMEDATALENset to a high value, like 1024. There is a 63 character limit in Postgres by default for table names.Section of file:
Then recompile as usual (configure, make, etc).
Comment #3
jsacksick commentedComment #4
xatoo commentedForcing people to recompile PostgreSQL is not my definition of 'fixed'.
Comment #5
jaredsmith commentedI agree -- forcing the user to recompile PostgreSQL with a special flag is not "fixed".
Comment #6
bendiy commentedEvery PostgreSQL security and bugfix minor release will then have to be patched and recompiled. This is a bad thing to do to your users. Especially given the recent PostgreSQL security hole.
http://www.postgresql.org/support/security/faq/2013-04-04/
Can we consider having some shorter naming conventions?
http://stackoverflow.com/questions/3836247/how-do-i-change-the-namedatal...
I think Drupal needs to break the convention of:
How do we do that? I'm not sure yet...
Comment #7
jsacksick commentedThe issue has to be fixed in Search API itself, marking this as a duplicate of #1214846: Table names might be too long for PostgreSQL