can't start tsearch2 in 8.2.4

Started by Nonamealmost 19 years ago8 messagesgeneral
Jump to latest
#1Noname
judexhuang@gmail.com

When I try to initiate tsearch2 in 8.2.4, I got the following error.

$ psql emedia_db < tsearch2.sql
SET
BEGIN
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"pg_ts_dict_pkey" for table "pg_ts_dict"
CREATE TABLE
ERROR: incompatible library "/usr/local/pgsql/lib/tsearch2.so":
missing magic block

..................

Does anyone know if there is a fix available?

Thanks

#2Noname
judexhuang@gmail.com
In reply to: Noname (#1)
Re: can't start tsearch2 in 8.2.4

On Apr 20, 11:38 pm, judexhu...@gmail.com wrote:

When I try to initiate tsearch2 in 8.2.4, I got the following error.

$ psql emedia_db < tsearch2.sql
SET
BEGIN
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"pg_ts_dict_pkey" for table "pg_ts_dict"
CREATE TABLE
ERROR: incompatible library "/usr/local/pgsql/lib/tsearch2.so":
missing magic block

..................

Does anyone know if there is a fix available?

Thanks

I have seen discussion about adding PG_MODULE_MAGIC to .c or .h code.
Does anyone have suggestion about where I should add this to tsearch2
code, and how should I rebuild tsearch2 with this?

Thanks.

#3Noname
ptjm@interlog.com
In reply to: Noname (#1)
Re: can't start tsearch2 in 8.2.4

In article <1177213190.291022.39730@d57g2000hsg.googlegroups.com>,
<judexhuang@gmail.com> wrote:
% On Apr 20, 11:38 pm, judexhu...@gmail.com wrote:
% > When I try to initiate tsearch2 in 8.2.4, I got the following error.
% >
% > $ psql emedia_db < tsearch2.sql
% > SET
% > BEGIN
% > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
% > "pg_ts_dict_pkey" for table "pg_ts_dict"
% > CREATE TABLE
% > ERROR: incompatible library "/usr/local/pgsql/lib/tsearch2.so":
% > missing magic block
% >
% > ..................
% >
% > Does anyone know if there is a fix available?
% >
% > Thanks
%
% I have seen discussion about adding PG_MODULE_MAGIC to .c or .h code.
% Does anyone have suggestion about where I should add this to tsearch2
% code, and how should I rebuild tsearch2 with this?

Probably the easiest thing is to use the tsearch2 from the 8.2 contrib
directory. It already works with 8.2.

--

Patrick TJ McPhee
North York Canada
ptjm@interlog.com

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: can't start tsearch2 in 8.2.4

judexhuang@gmail.com writes:

When I try to initiate tsearch2 in 8.2.4, I got the following error.
ERROR: incompatible library "/usr/local/pgsql/lib/tsearch2.so":
missing magic block

Apparently you have a pre-8.2 version installed in /usr/local.
Update.

regards, tom lane

#5Martijn van Oosterhout
kleptog@svana.org
In reply to: Tom Lane (#4)
Re: can't start tsearch2 in 8.2.4

On Mon, Apr 23, 2007 at 12:31:32AM -0400, Tom Lane wrote:

judexhuang@gmail.com writes:

When I try to initiate tsearch2 in 8.2.4, I got the following error.
ERROR: incompatible library "/usr/local/pgsql/lib/tsearch2.so":
missing magic block

Apparently you have a pre-8.2 version installed in /usr/local.
Update.

Perhaps we should add a HINT message with something to the effect of
"Perhaps it was compiled for an older version".

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

From each according to his ability. To each according to his ability to litigate.

#6Noname
judexhuang@gmail.com
In reply to: Tom Lane (#4)
Re: can't start tsearch2 in 8.2.4

On Apr 23, 12:31 am, t...@sss.pgh.pa.us (Tom Lane) wrote:

judexhu...@gmail.com writes:

When I try to initiate tsearch2 in 8.2.4, I got the following error.
ERROR: incompatible library "/usr/local/pgsql/lib/tsearch2.so":
missing magic block

Apparently you have a pre-8.2 version installed in /usr/local.
Update.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Thank you for your help.

You're absolutely correct. I cleaned up all the 8.1 and got a lot
further.
After runing psql dbname < tsearch2.sql, there are many SETs, then

...
SET
psql:tsearch2.sql:7: tsearch2.sql: Too many open files
RESET client_min_messages;
RESET
--tsvector
SELECT '1'::tsvector;
psql:tsearch2.sql:12: ERROR: type "tsvector" does not exist
LINE 1: SELECT '1'::tsvector;
^
...

Any ides about "Too many open files? It never happen to me in the
past and I don't know how many times I have successfully done this in
the past.

A side note, I noticed, I have to run the SQL script int the sql
directory, i.e. I can't do psql dbname < /dirname/tsearch2.sql

Regards

#7Noname
judexhuang@gmail.com
In reply to: Martijn van Oosterhout (#5)
Re: can't start tsearch2 in 8.2.4

On Apr 23, 2:10 am, klep...@svana.org (Martijn van Oosterhout) wrote:

On Mon, Apr 23, 2007 at 12:31:32AM -0400, Tom Lane wrote:

judexhu...@gmail.com writes:

When I try to initiate tsearch2 in 8.2.4, I got the following error.
ERROR: incompatible library "/usr/local/pgsql/lib/tsearch2.so":
missing magic block

Apparently you have a pre-8.2 version installed in /usr/local.
Update.

Perhaps we should add a HINT message with something to the effect of
"Perhaps it was compiled for an older version".

Have a nice day,
--
Martijn van Oosterhout <klep...@svana.org> http://svana.org/kleptog/

From each according to his ability. To each according to his ability to litigate.

signature.asc
1KDownload

If I posted multiple times, please forgive me. Just did not see it go
through for a while.

Thank you for your help.

You're absolutely correct. I cleaned up all the 8.1 and got a lot
further.
After runing psql dbname < tsearch2.sql, there are many SETs, then

...
SET
psql:tsearch2.sql:7: tsearch2.sql: Too many open files
RESET client_min_messages;
RESET
--tsvector
SELECT '1'::tsvector;
psql:tsearch2.sql:12: ERROR: type "tsvector" does not exist
LINE 1: SELECT '1'::tsvector;
^
...

Any ides about "Too many open files? It never happen to me in the
past and I don't know how many times I have successfully done this in
the past.

A side note, I noticed, I have to run the SQL script int the sql
directory, i.e. I can't do psql dbname < /dirname/tsearch2.sql

Regards

#8Noname
judexhuang@gmail.com
In reply to: Noname (#7)
Re: can't start tsearch2 in 8.2.4

On Apr 23, 4:11 pm, judexhu...@gmail.com wrote:

On Apr 23, 2:10 am, klep...@svana.org (Martijn van Oosterhout) wrote:

On Mon, Apr 23, 2007 at 12:31:32AM -0400, Tom Lane wrote:

judexhu...@gmail.com writes:

When I try to initiate tsearch2 in 8.2.4, I got the following error.
ERROR: incompatible library "/usr/local/pgsql/lib/tsearch2.so":
missing magic block

Apparently you have a pre-8.2 version installed in /usr/local.
Update.

Perhaps we should add a HINT message with something to the effect of
"Perhaps it was compiled for an older version".

Have a nice day,
--
Martijn van Oosterhout <klep...@svana.org> http://svana.org/kleptog/

From each according to his ability. To each according to his ability to litigate.

signature.asc
1KDownload

If I posted multiple times, please forgive me. Just did not see it go
through for a while.

Thank you for your help.

You're absolutely correct. I cleaned up all the 8.1 and got a lot
further.
After runing psql dbname < tsearch2.sql, there are many SETs, then

...
SET
psql:tsearch2.sql:7: tsearch2.sql: Too many open files
RESET client_min_messages;
RESET
--tsvector
SELECT '1'::tsvector;
psql:tsearch2.sql:12: ERROR: type "tsvector" does not exist
LINE 1: SELECT '1'::tsvector;
^
...

Any ides about "Too many open files? It never happen to me in the
past and I don't know how many times I have successfully done this in
the past.

A side note, I noticed, I have to run the SQL script int the sql
directory, i.e. I can't do psql dbname < /dirname/tsearch2.sql

Regards

It turns out in the current version, tsearch2.sql is in the contrib/
tsearch2/sql but you can't run the script in that directory, you still
have to run it in contrib/tsearch2, as psql dbname < sql/tsearch2.sql.
Otherwise it runs out of file handles with recursive inclusion.

Thank.