[Bucardo-general] installer problem

Vilem Kebrt kebrt at netair.cz
Wed Sep 9 15:08:45 UTC 2009


Vilem Kebrt napsal(a):
> Hello,
> one little information about installer: it's using to connect to db via 
> psql the same dbname as username...and sometimes it's not true :)
> see here:
> 
> prometheus# ./bucardo_ctl install
> This will install the bucardo database into an existing Postgres cluster.
> Postgres must have been compiled with Perl support,
> and you must connect as a superuser
> 
> We will create a new superuser named 'bucardo',
> and make it the owner of a new database named 'bucardo'
> 
> Current connection settings:
> 1. Host:          <none>
> 2. Port:          5432
> 3. User:          postgres
> 4. PID directory: /var/run/bucardo
> Enter a number to change it, P to proceed, or Q to quit: 1
> 
> Change the host to: 127.0.0.1
> 
> Changed host to: 127.0.0.1
> Current connection settings:
> 1. Host:          127.0.0.1
> 2. Port:          5432
> 3. User:          postgres
> 4. PID directory: /var/run/bucardo
> Enter a number to change it, P to proceed, or Q to quit: 3
> 
> Change the user to: pgsql
> 
> Changed user to: pgsql
> Current connection settings:
> 1. Host:          127.0.0.1
> 2. Port:          5432
> 3. User:          pgsql
> 4. PID directory: /var/run/bucardo
> Enter a number to change it, P to proceed, or Q to quit: P
> 
> psql: FATAL:  database "pgsql" does not exist
> Sorry, could not determine the version for that database
> prometheus#
> 
> so best fix will be add another option to that menu to name database.
> And why is bucardo user superuser ? why it can't be just normal user ?
> Thanx for informations.
> william
> 

i've mad that little fix myself :) see here:

bucardo_ctl
line 3840 ( at begining of sub install):
my $indb = "postgres";

line 3870 ( print installer menu) :
#added by saevar - 1 line
print	 "5. Initial connect db: $indb\n";

line 3941(afrer Changed PID dir to : $piddir print):
elsif(5 == $num) {
  if(!length $new) {
	print 'Change initial connect db to: ';
	$new = <>;
	chomp $new;
	$indb = $new;
	print "Changed initial connect db to: $indb\n";
	}	
}

line 3972 ( $PSQL creation before using psql to add scheme) :
my $PSQL = "psql -p $port -U $user -c 'SELECT version()' $indb"; #added 
$indb by saevar

line 3991( adding things from bucardo.schema to pgsql db):
$COM = "$PSQL -AX -qt -f $schema_file $indb"; #added $indb by saevar

just please use this simple fix, i don't know how to use git so i'm 
sending it this way, i hope it will be usefull, now installer works on 
freebsd as it should :)

with regards Vilem Kebrt alias saevar(irc.freenode.net)

-- 
S pozdravem
V. Kebrt

-----------------------------------
NETAIR, s.r.o.
Vilem Kebrt
512 43 Jablonec nad Jizerou č.p.364
mobil: +420 604 550 132
tel: +420 604 553 444
voip: +420 488 572 050
mail: kebrt at netair.cz <mailto:kebrt at netair.cz>
web: www.netair.cz <http://www.netair.cz/>
-----------------------------------



More information about the Bucardo-general mailing list