From: | Maxim Boguk <mboguk(at)masterhost(dot)ru> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Cannot drop user (PostgreSQL 8.1.11) |
Date: | 2008-06-02 15:12:35 |
Message-ID: | 48440DE3.6010501@masterhost.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I trying drop old user but got some strange issues:
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(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | Henry | 2008-06-02 15:32:48 | dblink() cursor error/issue (TopMemoryContext) |
Previous Message | Teodor Sigaev | 2008-06-02 14:10:21 | Re: [GENERAL] Fragments in tsearch2 headline |