Hi friends of Drupal Commerce Kickstart,
This issue seems to be very similar to the issue that I have posted before: http://drupal.org/node/1545936
The installation of the "demo store" fails at module 26 " kickstart search module" with the error:
SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "search_api_db_search_commerce_display_field_product_commerce_" already exists
I did not use any table prefix but the table name seems to be still too long for PostgresSQL
The table name "search_api_db_search_commerce_display_field_product_commerce" has already 60 characters.
When I reported the relating bug http://drupal.org/node/1545936 my the table name had 62 characters including a table prefix of 19 characters and I had the same error.
The solution was to shorten the table prefix to 2 characters that length of table name had only 45 characters.
Would it be possible to shorten the table name length to 45 characters or to a number of characters that is supported by PostgreSQL
Here is my configuration:
commerce_kickstart-7.x-2.0-alpha3-core.tar.gz
PostgreSQL 8.3
PHP 5.3.2
Lighttpd 1.4.20
greetings
Metulski
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | SearchApiDbService_Error.png | 155.56 KB | Metulski |
Comments
Comment #1
Metulski commentedSome more comments...
The installation setup offers the option not to install the "demo store" but during the installation of the additional modules there is a similar Error.
SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "search_api_db_kickstart_product_display_field_product_variation" already exists
I tried this with the development version commerce_kickstart-7.x-2.x-dev-core.tar.gz (28.07.2012). I guess the Error would be the same with the 7.x-2.0-alpha3 version.
By the way the table name has 63 characters.
=> installing commerce kickstart without the "demo store" is not the solution.
Nevertheless I could install the commerce_kickstart-7.x-2.x-dev-core.tar.gz (28.07.2012) version with a workaround.
If you use Firefox (p.e. version 13) you can configure it that it shows all tabs of the last session after a restart. If you close Firefox when the Error occures the installation process of the "demo store" will start right after Firefox is started again. But the incompletely installed "kickstart search module" is skipped and the installation process can run until the end. At the end you will see for one second an error message because of the missing kickstart search module (see attachment) and you cannot use the search function of the store.
Comment #2
bojanz commentedThose table names are auto-generated by Search API, so there's nothing I can do to make them shorter.
I suggest not using prefixes, they have very little point outside avoiding shared hosting limitations from 10 years ago ;)
I just googled a bit, and it seems Postgres needs to be recompiled for that limitation to be increased. That sucks.
EDIT: Shortened the server / index names slightly in the latest -dev, that should help a bit.
Comment #3
Metulski commentedThanks for the hint. I will try to recompile PostgreSQL with an increased table name length.
When I looked in the issue list of the search api project I saw that this issue is already known since 11 Jul 2011.
http://drupal.org/node/1214846
(Table names might be too long when DB prefix is used (even too long when no prefix is used (PostgreSQL8.3!!!))
A patch was written for this issue but obviously the patch included in the newer versions does not work.
Therefore the issue was reopened and the status is "needs work" now.
Comment #4
Metulski commentedWORKAROUND
I compiled the latest PostgeSQL 9.1.5 version with the "#define NAMEDATALEN 128" (default value 64 of file pg_config_manual.h ) and there was no error at installation of the "kickstart search (api) module" anymore.
But I guess (re)compiling PostgreSQL with changed default settings as a workaround will not be an acceptable workaround for the majority of commerce kickstart users.