medillcmip / Radregator

A Context Management System
GNU General Public License v3.0
7 stars 1 forks source link

Trouble adding to topic summary #158

Open ghing opened 13 years ago

ghing commented 13 years ago

On 2011-03-19, Elizabeth Bahm reported:

"I'm trying to add a new topic now and I'm having an issue (in Chrome) where it seems like I can't add anything else to the topic, whether links or text, without it not allowing updates (ie, nothing happens when I click update)."

Shane found the relevant error log:

[Mon Mar 21 16:34:58 2011] [error] [client 127.0.0.1] DatabaseError: index row size 2920 exceeds btree maximum, 2712,

ghing commented 13 years ago

According to http://joseph.randomnetworks.com/2005/08/05/postgresql-index-limitation-index-row-size-xxxxx-exceeds-btree-maximum-2713/, the error suggests that there isn't a problem with the amount of text Postgres can store, but the amount that it can index. The post suggests removing the index or switching to a partial index. This should be okay for us since we don't have search functionality right now.

I wonder what about the model (I'm assuming that it's core.models.Summary) creates this index. Looking at the SQL (./manage.py sqlall core) might be the next step for figuring this out.

ghing commented 13 years ago

I'm not seeing an index on the summary text.

$ ./manage.py sqlall core

...

CREATE INDEX "core_topic_summary_id" ON "core_topic" ("summary_id"); CREATE INDEX "core_comment_user_id" ON "core_comment" ("user_id"); CREATE INDEX "core_comment_comment_type_id" ON "core_comment" ("comment_type_id"); CREATE INDEX "core_commentrelation_left_comment_id" ON "core_commentrelation" ("left_comment_id"); CREATE INDEX "core_commentrelation_right_comment_id" ON "core_commentrelation" ("right_comment_id"); CREATE INDEX "core_commentresponse_comment_id" ON "core_commentresponse" ("comment_id"); CREATE INDEX "core_commentresponse_user_id" ON "core_commentresponse" ("user_id");COMMIT;

Next step would be to look at the actual database schema and maybe try a manual SQL insert on a test database.