knizhnik / imcs

In-Memory Columnar Store extension for PostgreSQL
Apache License 2.0
203 stars 33 forks source link

Problems with 'function TABLE_load' #39

Closed NihalHarish closed 10 years ago

NihalHarish commented 10 years ago

I get two different errors when I run TABLE_load after cs_create;

"The connection to the server was lost. Attempting reset: Failed." and "Colunmar store was not properly initialized, please check that imcs plugin was added to shared_preload_libraries list CONTEXT: PL/pgSQL function city_load(boolean,text) line 1 at RETURN newworld=# select city_load();"

I tried specifying shared_preload_libraries = '$libdir/imcs' and shared_preload_libraries = '/usr/local/pgsql/lib/imcs' (absolute path), but neither resolved problem 2.

And with context to problem 1, the logger says "LOG: server process (PID 5709) was terminated by signal 11: Segmentation fault DETAIL: Failed process was running: select city_load();".

knizhnik commented 10 years ago

So even if you adding '$libdir/imcs' you still get "Columnar store was not properly initialized" error message. Can you inspect log file in this case - do not try to execute cs_create and "select city_load();" Just restart server with

  shared_preload_libraries = '$libdir/imcs'

...and send me log file

On Jul 8, 2014, at 3:10 PM, NihalHarish wrote:

I get two different errors when I run TABLE_load after cs_create;

"The connection to the server was lost. Attempting reset: Failed." and "Colunmar store was not properly initialized, please check that imcs plugin was added to shared_preload_libraries list CONTEXT: PL/pgSQL function city_load(boolean,text) line 1 at RETURN newworld=# select city_load();"

I tried specifying shared_preload_libraries = '$libdir/imcs' and shared_preload_libraries = '/usr/local/pgsql/lib/imcs' (absolute path), but neither resolved problem 2.

And with context to problem 1, the logger says "LOG: server process (PID 5709) was terminated by signal 11: Segmentation fault DETAIL: Failed process was running: select city_load();".

— Reply to this email directly or view it on GitHub.

Samrat-Revagade commented 10 years ago

Jus a check: Have you restarted server after adding shared_preload_libraries = '/usr/local/pgsql/lib/imcs' to postgresql.conf ? If yes did server started ?

NihalHarish commented 10 years ago

LOG: database system is ready to accept connections LOG: autovacuum launcher started

NihalHarish commented 10 years ago

@Samrat-Revagade : Yes. The Server started.

knizhnik commented 10 years ago

And which version of PostgreSQL you are using? Looks like it is not supporting shared_preload_libraries...

On Jul 8, 2014, at 3:46 PM, NihalHarish wrote:

@Samrat-Revagade : Yes. The Server started.

— Reply to this email directly or view it on GitHub.

NihalHarish commented 10 years ago

I'm using 9.3. Perhaps something wrong with the installation, because I do not get an error when I run cs_create. Also the imcs.so is present in the lib directory.

knizhnik commented 10 years ago

Can you send me your configuration file?

On Jul 8, 2014, at 3:10 PM, NihalHarish wrote:

I get two different errors when I run TABLE_load after cs_create;

"The connection to the server was lost. Attempting reset: Failed." and "Colunmar store was not properly initialized, please check that imcs plugin was added to shared_preload_libraries list CONTEXT: PL/pgSQL function city_load(boolean,text) line 1 at RETURN newworld=# select city_load();"

I tried specifying shared_preload_libraries = '$libdir/imcs' and shared_preload_libraries = '/usr/local/pgsql/lib/imcs' (absolute path), but neither resolved problem 2.

And with context to problem 1, the logger says "LOG: server process (PID 5709) was terminated by signal 11: Segmentation fault DETAIL: Failed process was running: select city_load();".

— Reply to this email directly or view it on GitHub.

knizhnik commented 10 years ago

If library is successfully loaded, there should be correspondent record in PostgreSQL log file. For example the is the logfile after I restarted my PostgreSQL server:

[postgres@beauty ~]$ cat logfile LOG: loaded library "$libdir/imcs" LOG: database system was shut down at 2014-03-25 11:50:28 PDT LOG: database system is ready to accept connections LOG: autovacuum launcher started

On Jul 8, 2014, at 8:32 PM, NihalHarish wrote:

I'm using 9.3. Perhaps something wrong with the installation, because I do not get an error when I run cs_create.

— Reply to this email directly or view it on GitHub.

NihalHarish commented 10 years ago

Is there anything I should look for in the log when I create/drop the imcs extension?

NihalHarish commented 10 years ago

Also how does it successfully create the imcs extension and execute the query select cs_create; if the library failed to load?

knizhnik commented 10 years ago

On Jul 9, 2014, at 9:50 AM, Nihal Harish wrote:

Also how does it successfully create the imcs extension and execute the query select cs_create; if the library failed to load?

Library is loaded, but not at postmaster start time and so IMCS is not able to allocate shared memory.

— Reply to this email directly or view it on GitHub.