From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | David Gagnon <dgagnon(at)siunik(dot)com>, Marco Colombo <pgsql(at)esiway(dot)net>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: I'm OWNER of the db but I get `permission denied` when |
Date: | 2005-03-23 16:52:38 |
Message-ID: | 20050323165238.GA52453@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Mar 23, 2005 at 04:07:59PM +0000, Richard Huxton wrote:
> Don't forget pg_class isn't in your database, it's shared by all.
Each database has its own pg_class:
SELECT relname, relkind, relisshared
FROM pg_class
WHERE relname = 'pg_class';
relname | relkind | relisshared
----------+---------+-------------
pg_class | r | f
(1 row)
You can query pg_class to see that its contents are different in
different databases, and you can use "ls -li" on the on-disk files
to see that they have different inode numbers and (usually) different
sizes and modified times.
Here are the shared objects in an 8.0.1 database (excluding indexes):
SELECT relname, relkind
FROM pg_class
WHERE relkind <> 'i' AND relisshared IS TRUE
ORDER BY relname;
relname | relkind
---------------+---------
pg_database | r
pg_group | r
pg_shadow | r
pg_tablespace | r
pg_toast_1260 | t
pg_toast_1261 | t
pg_toast_1262 | t
pg_xactlock | s
(8 rows)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
From | Date | Subject | |
---|---|---|---|
Next Message | A. Mous | 2005-03-23 16:56:33 | Re: Simple query takes a long time on win2K |
Previous Message | Tom Lane | 2005-03-23 16:51:02 | Re: Simple query takes a long time on win2K |