template1=# drop USER szhuchkov;
ERROR: role "szhuchkov" cannot be dropped because some objects depend on it
DETAIL: 1 objects in database billing
2 objects in database shop
ok... lets look closer these two DB:
shop=# drop USER szhuchkov;
ERROR: role "szhuchkov" cannot be dropped because some objects depend on it
DETAIL: owner of type pg_toast.pg_toast_406750
owner of type pg_toast.pg_toast_1770195
1 objects in database billing
hm damn strange...
shop=# SELECT * from pg_user where usename='szhuchkov';
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig
-----------+----------+-------------+----------+-----------+----------+----------+--------------------------------
szhuchkov | 16387 | f | f | f | ******** | | {"search_path=bill, billstat"}
(1 запись)
Lets look pg_type for these two types:
shop=# SELECT typname,typowner from pg_type where typname IN ('pg_toast_406750', 'pg_toast_1770195');
typname | typowner
------------------+----------
pg_toast_1770195 | 10
pg_toast_406750 | 10
(записей: 2)
owner right (pgsql)
Lets look db billing:
billing=# drop USER szhuchkov;
ERROR: role "szhuchkov" cannot be dropped because some objects depend on it
DETAIL: owner of function vz_vds_ip_add(integer,bigint)
2 objects in database shop
billing=# SELECT proname,proowner from pg_proc where proname like '%vz_vds_ip_add%';
proname | proowner
---------------+----------
vz_vds_ip_add | 10
(1 запись)
ok... again right owner... no signs of szhuchkov
Last test... lets try pg_dumpall -s :
[pgsql@ctrl7 /home/mboguk]$ pg_dumpall -s | grep szhuchkov
CREATE ROLE szhuchkov;
ALTER ROLE szhuchkov WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN PASSWORD '*******';
ALTER ROLE szhuchkov SET search_path TO bill, billstat;
GRANT bill1c_r TO szhuchkov GRANTED BY pgsql;
GRANT bill_r TO szhuchkov GRANTED BY pgsql;
GRANT billexch_r TO szhuchkov GRANTED BY pgsql;
GRANT billstat_r TO szhuchkov GRANTED BY pgsql;
GRANT shop_r TO szhuchkov GRANTED BY pgsql;
GRANT templar_r TO szhuchkov GRANTED BY pgsql;
Nothing more... so according pg_dumpall szhuchkov also doesnt have any active objects in DB.
In all other sides DB work 24x7 well without any other issues
(and because 24x7 requirements i cannot stop DB and drop user from single user mode).
Any ideas? or what to check else?
--
Maxim Boguk
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
No comments:
Post a Comment