Ask Your Question
1

How to fix search when switching from MySQL to Postgresql?

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

siovene gravatar image

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

Evgeny gravatar image

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+?

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

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

siovene gravatar image

I did this and it fixed it:

python manage.py init_postgresql_full_text_search

I read about it here.

edit flag offensive delete link more

Comments

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 gravatar imageEvgeny ( 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 gravatar imagesiovene ( 2013-03-12 03:49:45 -0600 )edit
0

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

Evgeny gravatar image

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

Comments

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

siovene gravatar imagesiovene ( 2013-03-08 11:36:08 -0600 )edit

What was your migration number prior to the upgrade?

Evgeny gravatar imageEvgeny ( 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 gravatar imageEvgeny ( 2013-03-08 11:43:37 -0600 )edit

These are my south migrations: http://dpaste.com/1016301/ And this is the output of that sql: http://dpaste.com/1016302/

siovene gravatar imagesiovene ( 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 manage.py migrate --list ?

Evgeny gravatar imageEvgeny ( 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

Stats

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

Seen: 133 times

Last updated: Mar 12 '13