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

Michael Ablassmeier abi at grinser.de
Wed Sep 20 06:32:59 UTC 2006


hi sean,

On Tue, Sep 19, 2006 at 11:22:54PM +0200, sean finney wrote:
> 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.

*argh*. I was *sure* i did test that case. Seems like i missed that point.

> 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.

yes, moving the stanza in prerm above the dbconfig-common call works
nicely and the package successfully purges its database setup. Thanks
for your time! (having a short note somewhere in the Docs might be
helpful since i've discovered the same problem for the mysql part of the
package, even tho mysql doesnt care about it that much)

bye,
    - michael



More information about the Dbconfig-common-devel mailing list