Ask Your Question

How to fix search when switching from MySQL to Postgresql?

asked 2013-03-08 11:32:41 -0600

siovene's avatar

updated 2013-03-12 08:33:26 -0600

Evgeny's avatar

Hi, I ran the SQL script for the search on Postgres, but I still get errors about missing columns on some table.

column askbot_thread.text_search_vector does not exist
LINE 1: ...estion'  AND "askbot_post"."deleted" = false  AND askbot_thr...

I read somewhere here that you guys run Postgres 8.4, but that's pretty old. Can you please figure out why it doesn't work on 9.1+?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-03-08 12:19:23 -0600

siovene's avatar

I did this and it fixed it:

python init_postgresql_full_text_search

I read about it here.

edit flag offensive delete link more


Which version did you upgrade to? It is very hard to answer a question about upgrade or deployment without the information on the version. This command will rerun the search setup script but will not run any migrations. I don't believe there is a bug in the development version as I run it on postgres 9.1 on several sites.

Evgeny's avatar Evgeny  ( 2013-03-08 13:38:41 -0600 )edit

I didn't upgrade to a version. I was running on .43 and switched from MySQL to PostgreSQL. The command above (in this answer) fixed my problem.

siovene's avatar siovene  ( 2013-03-12 03:49:45 -0600 )edit

answered 2013-03-08 11:34:05 -0600

Evgeny's avatar

Possibly migrations failed. The search works for me on postgres 9.1.

You might want to increase the statement timeout setting on your postgres at least temporarily.

edit flag offensive delete link more


I've update the question with the error. All my migrations seem in order. What can I do to fix this?

siovene's avatar siovene  ( 2013-03-08 11:36:08 -0600 )edit

What was your migration number prior to the upgrade?

Evgeny's avatar Evgeny  ( 2013-03-08 11:39:55 -0600 )edit

Try running this postgres script manually and please post any errors that you see: askbot/search/postgresql/thread_and_post_models_01022013.plsql

Evgeny's avatar Evgeny  ( 2013-03-08 11:43:37 -0600 )edit

These are my south migrations: And this is the output of that sql:

siovene's avatar siovene  ( 2013-03-08 11:49:23 -0600 )edit

If you have askbot from the trunk we have 164 migrations. What do you get with: python migrate --list ?

Evgeny's avatar Evgeny  ( 2013-03-08 13:12:08 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-03-08 11:32:41 -0600

Seen: 470 times

Last updated: Mar 12 '13