Hi again,

Martin Pitt [2006-07-23 11:12 +0200]:
>  1. Add and ship /etc/postgresql-common/upgrade.d/. Scripts in that
>  directory will be called with the following arguments:
> 
>  <old version> <cluster name> <new version> <db user to connect as> <phase> 

Two possibilities here:

 * Scripts can be called as root. This allows maximum flexibility,
   but also requires a lot of "su -c 'foo' $dbuser" ugliness to
   connect to the database.

 * Scripts can be called as the user who owns the database. This will
   make the '<db user to connect as>' obsolete, since 'id -run' will
   give the same, and knowing the particular database superuser will
   generally not be required any more.

Stephen, do you see any reason why the scripts need root privs? The
second option seems much more convenient to me.

Thanks,

Martin

-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?

Attachment: signature.asc
Description: Digital signature

Reply via email to