[Dbconfig-common-devel] Re: Package fails to remove database on postgresql

sean finney seanius at debian.org
Tue Sep 19 21:22:54 UTC 2006


hey  michael,

On Tue, 2006-09-19 at 15:33 +0200, Michael Ablassmeier wrote:
> the interesting part of the package are the ones about pgsql:
> 
>  debian/zabbix-server-pgsql.{config,postinst,postrm ..}

i can reproduce your problem... looking in my postgres logs i see:

ERROR:  database "zabbix" is being accessed by other users
ERROR:  role "zabbix" cannot be dropped because some objects depend on
it

i think this is because the zabbix server has the datbase open while the
removal code is running in the prerm script.   if you manually stop the
zabbix server before purging i think you'll see what i'm talking about.

as for how to workaround this... you could manually stop the server
before calling dbc_go when $1 is set to "remove", or you could call the
dbconfig hooks after the #DEBHELPER# macro.

since this could be a general problem with other pgsql+daemon packages,
i'd appreciate suggestions for how to mention this in documentation,
assuming this solves your problem :)

	sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/dbconfig-common-devel/attachments/20060919/98826131/attachment.pgp


More information about the Dbconfig-common-devel mailing list