Error: absolute path not allowed

Started by wschwurackover 13 years ago9 messagesgeneral
Jump to latest
#1wschwurack
wolf@uen.org

I am getting a repeating error and not sure what why.

2013-01-08 06:12:08 MSTERROR: absolute path not allowed
2013-01-08 06:12:08 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)
2013-01-08 06:42:10 MSTERROR: absolute path not allowed
2013-01-08 06:42:10 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)
2013-01-08 07:12:01 MSTERROR: absolute path not allowed
2013-01-08 07:12:01 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)
2013-01-08 07:42:02 MSTERROR: absolute path not allowed
2013-01-08 07:42:02 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)

Anyone know why I'm getting this?

0___ Wolfgang Schwurack
c/ /'_ DBA/SA
(*) \(*) University of Utah/UEN
Tel: (801) 587-9444
email: wolf@uen.org

#2Scott Marlowe
scott.marlowe@gmail.com
In reply to: wschwurack (#1)
Re: Error: absolute path not allowed

On Tue, Jan 8, 2013 at 8:09 AM, Wolf Schwurack <wolf@uen.org> wrote:

I am getting a repeating error and not sure what why.

2013-01-08 06:12:08 MSTERROR: absolute path not allowed

2013-01-08 06:12:08 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)

2013-01-08 06:42:10 MSTERROR: absolute path not allowed

2013-01-08 06:42:10 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)

2013-01-08 07:12:01 MSTERROR: absolute path not allowed

2013-01-08 07:12:01 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)

2013-01-08 07:42:02 MSTERROR: absolute path not allowed

2013-01-08 07:42:02 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)

Anyone know why I’m getting this?

Just a guess but it looks like $1 has an absolute path (i.e. it starts with / )

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Raghavendra
raghavendra.rao@enterprisedb.com
In reply to: wschwurack (#1)
Re: Error: absolute path not allowed

On Tue, Jan 8, 2013 at 8:39 PM, Wolf Schwurack <wolf@uen.org> wrote:

I am getting a repeating error and not sure what why. ****

** **

2013-01-08 06:12:08 MSTERROR: absolute path not allowed****

2013-01-08 06:12:08 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)****

2013-01-08 06:42:10 MSTERROR: absolute path not allowed****

2013-01-08 06:42:10 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)****

2013-01-08 07:12:01 MSTERROR: absolute path not allowed****

2013-01-08 07:12:01 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)****

2013-01-08 07:42:02 MSTERROR: absolute path not allowed****

2013-01-08 07:42:02 MSTSTATEMENT: SELECT pg_read_file($1, 0, 1048576)****

**

pg_read_file() search's from $PGDATA location.

Can we see how pg_read_file() has been called ?

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

#4wschwurack
wolf@uen.org
In reply to: Raghavendra (#3)
Re: Error: absolute path not allowed

How do I find what is calling pg_read_file

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Error-absolute-path-not-allowed-tp5739320p5739424.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5Scott Marlowe
scott.marlowe@gmail.com
In reply to: wschwurack (#4)
Re: Error: absolute path not allowed

Look at your log line prefix setting in postgresql.conf. Specifically
log things like db, host, username, etc.

On Wed, Jan 9, 2013 at 12:50 PM, wschwurack <wolf@uen.org> wrote:

How do I find what is calling pg_read_file

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Error-absolute-path-not-allowed-tp5739320p5739424.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--
To understand recursion, one must first understand recursion.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6Raghavendra
raghavendra.rao@enterprisedb.com
In reply to: wschwurack (#4)
Re: Error: absolute path not allowed

On Thu, Jan 10, 2013 at 1:20 AM, wschwurack <wolf@uen.org> wrote:

How do I find what is calling pg_read_file

As said, check the log's to find DB,Host,User etc. from where its been
called. If log_line_prefix not set to appropriate to all those details then
change it as shown below which just need RELOAD of server. After changing
your logs should show those details. Eg:-
log_line_prefix = '%t [%p]: [%l-1] db=%d,user=%u client=%h'

Also, its just my guess, if pg_read_file() function called from any other
function then you can check with below query.

select proname from pg_proc where prosrc ilike '%pg_read_file%' and
pronamespace=(select oid from pg_namespace where nspname='public');

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

#7wschwurack
wolf@uen.org
In reply to: Raghavendra (#6)
Re: Error: absolute path not allowed

I added the values to log_line_prefix but this still doesn't give me anymore
info on why I'm getting the error

log_line_prefix = '%t [%p]: [%1-1] db=%d, user=%u, client=%h '

2013-01-10 07:42:03 MST [8555]: [-1] db=postgres, user=postgres,
client=10.11.0.200 ERROR: absolute path not allowed
2013-01-10 07:42:03 MST [8555]: [-1] db=postgres, user=postgres,
client=10.11.0.200 STATEMENT: SELECT pg_read_file($1, 0, 1048576)

the client is the database server

I ran the query, no rows found

postgres=# select proname from pg_proc
postgres-# where prosrc like '%pg_read_file%'
postgres-# and pronamespace=(select oid from pg_namespace where
nspname='public');
proname
---------
(0 rows)

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Error-absolute-path-not-allowed-tp5739320p5739543.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#8wschwurack
wolf@uen.org
In reply to: Raghavendra (#6)
Re: Error: absolute path not allowed

I did some more debugging and found that I'm only getting the errors on the
databases that is being monitored by Postgres Enterprise Manager. I Will
have to contact EnterpriseDB support

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Error-absolute-path-not-allowed-tp5739320p5739545.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#9wschwurack
wolf@uen.org
In reply to: wschwurack (#8)
Re: Error: absolute path not allowed

I found what pg_read_file didn't like. With the help of enterprisedb support
which gave me the steps to see what was wrong

1. set log_min_duration_statement = 0 in postgresql.conf: This will log all
statements
2. select pg_reload_conf(); reloads the parameters
3. Wait until the error message come up again.

The problem was I had set parameter hba_file to the soft link. I change the
parameter to the correct path which fixed the problem.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Error-absolute-path-not-allowed-tp5739320p5739598.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general