pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpreload libraries
4+ messages / 3 participants
[nested] [flat]
* preload libraries
@ 2007-05-22 17:15 flickchick_one <flickchick_one@yahoo.com>
2007-05-22 17:22 ` Re: preload libraries Joshua D. Drake <jd@commandprompt.com>
2007-05-22 17:43 ` Re: preload libraries Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 4+ messages in thread
From: flickchick_one @ 2007-05-22 17:15 UTC (permalink / raw)
To: pgsql-admin
Hello all -
I'm attempting to preload a shared object file (match.so) in order to create a C function in postgres that use will use it. To do this, I've added the following line to the postgresql.conf file:
preload_libraries = '/etc/postgresql/8.1/main/match.so'
Now when attempting to start the server, I receive the following error message:
Postgresql server failed to start. Please check the log output:
Although the message says to check the log for additional info, and a log is created for the event, the file is empty.
I'm very new to postgres, so I'm wondering if there's some sort of permission problem that I need to address.
One note - if I comment out the preload_libraries line, the server starts and runs fine. But if I then attempt to create the function that calls match.so, the server will crash with the following error message:
An error has occurred:
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
Again there are no details in the log to explain what is happening.
Thanks in advance for any assistance you can provide.
Chris
---------------------------------
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: preload libraries
2007-05-22 17:15 preload libraries flickchick_one <flickchick_one@yahoo.com>
@ 2007-05-22 17:22 ` Joshua D. Drake <jd@commandprompt.com>
1 sibling, 0 replies; 4+ messages in thread
From: Joshua D. Drake @ 2007-05-22 17:22 UTC (permalink / raw)
To: flickchick_one <flickchick_one@yahoo.com>; +Cc: pgsql-admin
flickchick_one wrote:
> Hello all -
>
> I'm attempting to preload a shared object file (match.so) in order to
> create a C function in postgres that use will use it. To do this, I've
> added the following line to the postgresql.conf file:
You don't have to preload match.so to use it. Just create the function
that calls it :)
Joshua D. Drake
>
> preload_libraries = '/etc/postgresql/8.1/main/match.so'
>
> Now when attempting to start the server, I receive the following error
> message:
>
> Postgresql server failed to start. Please check the log output:
>
> Although the message says to check the log for additional info, and a
> log is created for the event, the file is empty.
>
> I'm very new to postgres, so I'm wondering if there's some sort of
> permission problem that I need to address.
>
> One note - if I comment out the preload_libraries line, the server
> starts and runs fine. But if I then attempt to create the function that
> calls match.so, the server will crash with the following error message:
>
> An error has occurred:
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
>
> Again there are no details in the log to explain what is happening.
>
> Thanks in advance for any assistance you can provide.
>
> Chris
>
>
>
> ------------------------------------------------------------------------
> Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge
> <http://us.rd.yahoo.com/evt=47093/*http://tv.yahoo.com/collections/222>to
> see what's on, when.
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: preload libraries
2007-05-22 17:15 preload libraries flickchick_one <flickchick_one@yahoo.com>
@ 2007-05-22 17:43 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 2007-05-22 17:43 UTC (permalink / raw)
To: flickchick_one <flickchick_one@yahoo.com>; +Cc: pgsql-admin
flickchick_one <flickchick_one@yahoo.com> writes:
> I'm attempting to preload a shared object file (match.so) in order to create a C function in postgres that use will use it. To do this, I've added the following line to the postgresql.conf file:
> preload_libraries = '/etc/postgresql/8.1/main/match.so'
> Now when attempting to start the server, I receive the following error message:
> Postgresql server failed to start. Please check the log output:
> Although the message says to check the log for additional info, and a log is created for the event, the file is empty.
The error message is most likely going to postmaster's stderr, which
might or might not be captured by whatever logging setup you're using.
Try starting the postmaster "by hand", ie just "postmaster -D wherever",
and see if you get anything useful.
It sounds like it's probably an object-file compatibility problem, but
need the message to guess exactly what...
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: preload libraries
@ 2007-06-09 21:07 flickchick_one <flickchick_one@yahoo.com>
0 siblings, 0 replies; 4+ messages in thread
From: flickchick_one @ 2007-06-09 21:07 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
i've gone another direction on the issue, but am continuing to have problems with it. this time i've put my shared object file in the preferred location according to the pg_config command, then i'm attempting to create the function. i do have log output now, and am wondering if someone has an idea where to go with this. thanks in advance for your assistance.
Log file output:
<postgres - 2007-06-09 15:53:23 CDT>STATEMENT: CREATE FUNCTION match(text, text) RETURNS BOOLEAN
AS 'match.so', 'match'
LANGUAGE 'C';
< - 2007-06-09 15:53:23 CDT>DEBUG: 00000: server process (PID 27181) was terminated by signal 11
< - 2007-06-09 15:53:23 CDT>LOCATION: LogChildExit, postmaster.c:2432
< - 2007-06-09 15:53:23 CDT>LOG: 00000: server process (PID 27181) was terminated by signal 11
< - 2007-06-09 15:53:23 CDT>LOCATION: LogChildExit, postmaster.c:2432
< - 2007-06-09 15:53:23 CDT>LOG: 00000: terminating any other active server processes
< - 2007-06-09 15:53:23 CDT>LOCATION: HandleChildCrash, postmaster.c:2313
< - 2007-06-09 15:53:23 CDT>DEBUG: 00000: sending SIGQUIT to process 27168
< - 2007-06-09 15:53:23 CDT>LOCATION: HandleChildCrash, postmaster.c:2352
< - 2007-06-09 15:53:23 CDT>DEBUG: 00000: sending SIGQUIT to process 27154
< - 2007-06-09 15:53:23 CDT>LOCATION: HandleChildCrash, postmaster.c:2352
<postgres - 2007-06-09 15:53:23 CDT>WARNING: 57P02: terminating connection because of crash of another server process
<postgres - 2007-06-09 15:53:23 CDT>DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
<postgres - 2007-06-09 15:53:23 CDT>HINT: In a moment you should be able to reconnect to the database and repeat your command.
<postgres - 2007-06-09 15:53:23 CDT>LOCATION: quickdie, postgres.c:2118
< - 2007-06-09 15:53:23 CDT>DEBUG: 00000: sending SIGQUIT to process 27064
< - 2007-06-09 15:53:23 CDT>LOCATION: HandleChildCrash, postmaster.c:2366
< - 2007-06-09 15:53:23 CDT>DEBUG: 00000: sending SIGQUIT to process 27065
< - 2007-06-09 15:53:23 CDT>LOCATION: HandleChildCrash, postmaster.c:2400
< - 2007-06-09 15:53:23 CDT>DEBUG: 00000: server process (PID 27154) exited with exit code 1
< - 2007-06-09 15:53:23 CDT>LOCATION: LogChildExit, postmaster.c:2423
<postgres - 2007-06-09 15:53:23 CDT>WARNING: 57P02: terminating connection because of crash of another server process
<postgres - 2007-06-09 15:53:23 CDT>DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
<postgres - 2007-06-09 15:53:23 CDT>HINT: In a moment you should be able to reconnect to the database and repeat your command.
<postgres - 2007-06-09 15:53:23 CDT>LOCATION: quickdie, postgres.c:2118
< - 2007-06-09 15:53:23 CDT>DEBUG: 00000: server process (PID 27168) exited with exit code 1
< - 2007-06-09 15:53:23 CDT>LOCATION: LogChildExit, postmaster.c:2423
< - 2007-06-09 15:53:23 CDT>LOG: 00000: all server processes terminated; reinitializing
< - 2007-06-09 15:53:23 CDT>LOCATION: reaper, postmaster.c:2213
< - 2007-06-09 15:53:23 CDT>LOG: 00000: database system was interrupted at 2007-06-09 15:52:43 CDT
< - 2007-06-09 15:53:23 CDT>LOCATION: StartupXLOG, xlog.c:4373
< - 2007-06-09 15:53:23 CDT>LOG: 00000: checkpoint record is at 0/69E64C
< - 2007-06-09 15:53:23 CDT>LOCATION: StartupXLOG, xlog.c:4441
< - 2007-06-09 15:53:23 CDT>LOG: 00000: redo record is at 0/69E64C; undo record is at 0/0; shutdown FALSE
< - 2007-06-09 15:53:23 CDT>LOCATION: StartupXLOG, xlog.c:4468
< - 2007-06-09 15:53:23 CDT>LOG: 00000: next transaction ID: 2795; next OID: 57344
< - 2007-06-09 15:53:23 CDT>LOCATION: StartupXLOG, xlog.c:4471
< - 2007-06-09 15:53:23 CDT>LOG: 00000: next MultiXactId: 1; next MultiXactOffset: 0
< - 2007-06-09 15:53:23 CDT>LOCATION: StartupXLOG, xlog.c:4474
< - 2007-06-09 15:53:23 CDT>LOG: 00000: database system was not properly shut down; automatic recovery in progress
< - 2007-06-09 15:53:23 CDT>LOCATION: StartupXLOG, xlog.c:4531
< - 2007-06-09 15:53:23 CDT>LOG: 00000: redo starts at 0/69E690
< - 2007-06-09 15:53:23 CDT>LOCATION: StartupXLOG, xlog.c:4568
< - 2007-06-09 15:53:23 CDT>LOG: 00000: record with zero length at 0/710054
< - 2007-06-09 15:53:23 CDT>LOCATION: ReadRecord, xlog.c:2763
< - 2007-06-09 15:53:23 CDT>LOG: 00000: redo done at 0/71002C
< - 2007-06-09 15:53:23 CDT>LOCATION: StartupXLOG, xlog.c:4626
< - 2007-06-09 15:53:23 CDT>LOG: 00000: database system is ready
< - 2007-06-09 15:53:23 CDT>LOCATION: StartupXLOG, xlog.c:4820
< - 2007-06-09 15:53:23 CDT>LOG: 00000: transaction ID wrap limit is 2147484146, limited by database "postgres"
< - 2007-06-09 15:53:23 CDT>LOCATION: SetTransactionIdLimit, varsup.c:234
----- Original Message ----
From: Tom Lane <tgl@sss.pgh.pa.us>
To: flickchick_one <flickchick_one@yahoo.com>
Cc: pgsql-admin@postgresql.org
Sent: Tuesday, May 22, 2007 12:43:03 PM
Subject: Re: [ADMIN] preload libraries
flickchick_one <flickchick_one@yahoo.com> writes:
> I'm attempting to preload a shared object file (match.so) in order to create a C function in postgres that use will use it. To do this, I've added the following line to the postgresql.conf file:
> preload_libraries = '/etc/postgresql/8.1/main/match.so'
> Now when attempting to start the server, I receive the following error message:
> Postgresql server failed to start. Please check the log output:
> Although the message says to check the log for additional info, and a log is created for the event, the file is empty.
The error message is most likely going to postmaster's stderr, which
might or might not be captured by whatever logging setup you're using.
Try starting the postmaster "by hand", ie just "postmaster -D wherever",
and see if you get anything useful.
It sounds like it's probably an object-file compatibility problem, but
need the message to guess exactly what...
regards, tom lane
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2007-06-09 21:07 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-22 17:15 preload libraries flickchick_one <flickchick_one@yahoo.com>
2007-05-22 17:22 ` Joshua D. Drake <jd@commandprompt.com>
2007-05-22 17:43 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-06-09 21:07 Re: preload libraries flickchick_one <flickchick_one@yahoo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox