petere/plsh

ERROR: could not open file stream to temporary file: Invalid argument

Closed this issue · 3 comments

Hello Peter!!!

First, I absolutely LOVE plsh, thank you for creating this extension.

I am writing you regarding a bug that we are having on one of our servers regarding opening of tempfiles. The simplest reproducible case I could think of is as follows:

CREATE FUNCTION shellname() RETURNS text AS '

!/bin/bash

echo "${SHELL}"
' LANGUAGE plsh;

postgres=# SELECT shellname();
ERROR: could not open file stream to temporary file: Invalid argument

Any help or insight you can provide in this matter is greatly appreciated.

Thank you!

Which version of PL/sh are you using and what platform are you on?

Thank you for the quick response!!!!

We are running the latest git clone of PL/sh, fresh 9.2.2 release compile, OS is Gentoo and kernel is 3.4.24 with GNU libc 2.15.

After a nights rest we've discovered that it is only manifesting on our database servers, we installed postgresql 9.2.2 the exact same way on an application server. The only difference that is supposed to exist between those systems is the instance sizes on EC2 and what is running. This leads me to believe that there is an issue with our system configuration not PL/sh.

That said, if you have any insights into where to direct our attentions they would be greatly appreciated :)

Thank you again!!!

Peter,

Thank you so much for your replies!!!

Root cause was that our build proces had only partially succeeded so the issue was entirely outside the scope of PL/sh. PL/sh was the only piece of the code stack that held it's hand up and said "uh... guys... your stuff is broken..." ( although not in those exact words ;) ).

Thank you again for the immensely useful extension!!!

Yours,

~Wayne

P.S. If you ever need help testing out changes to PL/sh we would be most be happy to help!