I have a client who is running this query(just brings back info about
the databases on the server):
select
pgd.datname as database,
pdesc.description,
pgr.rolname as owner,
pgt.spcname as tablespace,
pg_size_pretty(pg_database_size(pgd.oid)) as dbsize,
pg_encoding_to_char(encoding) as encoding,
pgd.oid
from pg_database pgd
LEFT JOIN pg_roles pgr on pgr.oid = pgd.datdba
LEFT JOIN pg_description pdesc on pdesc.objoid = pgd.oid
LEFT JOIN pg_tablespace pgt on pgd.dattablespace = pgt.oid
WHERE pgd.datname not like 'template%' ORDER BY pgd.datname;
The exact error is(as reported from PG Admin III):
ERROR: could not open tablespace directory "pg_tblspc": No such file or
directory
SQL state: 58P01
The user is running on a Mac PC that is booting Windows XP via Bootcamp.
The user also claims that the error only occurs when running the query
locally i.e. localhost, but when he runs the query from a different PC
it works and he gets a result set back. The error occurs regardless of
the client as well, same error is reported via PG Admin III, PSQL, and LA.
Other queries such as select * from pg_tablespace work fine so I am at a
loss as why this query gives a pg_tblspc error.
He is running 8.2.6 win32 version on a Mac core 2 system that dual boots
to XP.
I have been trying for days to reproduce the error on my PCs running the
client and server on the same PC with no luck, I have tried the same
version of PGSQL he is running as well as 8.3 with no luck. I am
missing some info from the client like what user he is running as and
what his pg_hba.conf looks like.
If anyone has seen this before please let me know.
Thanks,
Tony Caduto
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general