pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedProblems with C Language Functions after upgrade to 7.3.2
4+ messages / 2 participants
[nested] [flat]
* Problems with C Language Functions after upgrade to 7.3.2
@ 2003-04-08 14:23 Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de>
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Holzheu @ 2003-04-08 14:23 UTC (permalink / raw)
To: pgsql-admin
Last friday we did an upgrade from postgres 7.1.3 to 7.3.2. In the
database there are triggers written in C, which start external programs
using the system calls fork+exec.
In 7.1.3 triggers worked fine. With 7.3.2 triggers work in most cases
but in some cases execution fails at fork or exec.
Any ideas?
Stefan
PS: We recompiled the shared libraries for 7.3.2. OS is Redhat Linux 7.1
--
-----------------------------
Dr. Stefan Holzheu
Tel.: 0921/55-5720
Fax.: 0921/55-5799
BITOeK Wiss. Sekretariat
Universitaet Bayreuth
D-95440 Bayreuth
-----------------------------
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problems with C Language Functions after upgrade to 7.3.2
@ 2003-04-08 14:49 Tom Lane <tgl@sss.pgh.pa.us>
parent: Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2003-04-08 14:49 UTC (permalink / raw)
To: Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de>; +Cc: pgsql-admin
Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de> writes:
> Last friday we did an upgrade from postgres 7.1.3 to 7.3.2. In the
> database there are triggers written in C, which start external programs
> using the system calls fork+exec.
> In 7.1.3 triggers worked fine. With 7.3.2 triggers work in most cases
> but in some cases execution fails at fork or exec.
Fails how? What's the error code exactly?
The notion of running external programs from a trigger strikes me as a
really bad idea in any case. (What happens if the transaction gets
rolled back later? You won't be able to undo whatever the external
program did.) But I don't know any reason why it would work less well
now than in 7.1.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problems with C Language Functions after upgrade to 7.3.2
@ 2003-04-08 16:28 Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Holzheu @ 2003-04-08 16:28 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
Thank, for the fast response
>>In 7.1.3 triggers worked fine. With 7.3.2 triggers work in most cases
>>but in some cases execution fails at fork or exec.
>
> Fails how? What's the error code exactly?
fork: errno 2 /* No such file or directory */
exec: errno 11 /* Try again */
>
> The notion of running external programs from a trigger strikes me as a
> really bad idea in any case. (What happens if the transaction gets
> rolled back later? You won't be able to undo whatever the external
> program did.)
That's true, and we are aware of this problem. But it is still better to
have the database to do this than a web server.
Would you prefere to use a normal function?
Thanks in advance
Stefan
> But I don't know any reason why it would work less well
> now than in 7.1.
>
> regards, tom lane
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
--
-----------------------------
Dr. Stefan Holzheu
Tel.: 0921/55-5720
Fax.: 0921/55-5799
BITOeK Wiss. Sekretariat
Universitaet Bayreuth
D-95440 Bayreuth
-----------------------------
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problems with C Language Functions after upgrade to 7.3.2
@ 2003-04-08 16:42 Tom Lane <tgl@sss.pgh.pa.us>
parent: Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2003-04-08 16:42 UTC (permalink / raw)
To: Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de>; +Cc: pgsql-admin
Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de> writes:
> In 7.1.3 triggers worked fine. With 7.3.2 triggers work in most cases
> but in some cases execution fails at fork or exec.
>> Fails how? What's the error code exactly?
> fork: errno 2 /* No such file or directory */
> exec: errno 11 /* Try again */
Hmm. You mean the other way round, I assume, because ENOENT surely
makes no sense for fork().
System resource exhaustion problems, maybe? EAGAIN for fork() strongly
suggests that. Perhaps you are running into a ulimit-like limit, such
as max processes per user? Not sure about ENOENT --- are you giving an
absolute path to locate the program to execute?
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-04-08 16:42 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-08 14:23 Problems with C Language Functions after upgrade to 7.3.2 Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de>
2003-04-08 14:49 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-04-08 16:28 ` Stefan Holzheu <stefan.holzheu@bitoek.uni-bayreuth.de>
2003-04-08 16:42 ` Tom Lane <tgl@sss.pgh.pa.us>
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