postgres=# SELECT pg_ls_dir('/nfs-mnt/postgres/tablespaces/omnia');
ERROR: absolute path not allowed
postgres=# \conninfo
You are connected to database "postgres" as user "postgres" via socket in "/var/run/postgresql" at port "5432".
Oh yeah. I just confirmed the functions were limited to only the cluster directory and log directory in 9.6, 10. And they were only changed to support files outside cluster directory later from 11.
Okay. Can you run
This postgresql.org/docs/10/functions-a.... seems to be the issue but I believe you are using superuser.
Yes iam using postgres as login user
postgres=# SELECT pg_ls_dir('/nfs-mnt/postgres/tablespaces/omnia');
ERROR: absolute path not allowed
postgres=# \conninfo
You are connected to database "postgres" as user "postgres" via socket in "/var/run/postgresql" at port "5432".
looks like pg_ls_dir works only on postgresql datadirectory $PGDATA
postgres=# SELECT pg_ls_dir('/nfs-mnt/postgres/data/base');
pg_ls_dir
13457
1
147972689
13456
124079171
(5 rows)
postgres=# SELECT pg_ls_dir('/nfs-mnt/postgres/tablespaces/omnia');
ERROR: absolute path not allowed
postgres=#
Oh yeah. I just confirmed the functions were limited to only the cluster directory and log directory in 9.6, 10. And they were only changed to support files outside cluster directory later from 11.
REF: postgresql.org/docs/release/11.0/#...