[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

sympa/pg/debian install woes

I'm trying to install Sympa on a Debian(woody) machine but not getting
far :-(

I've tracked it down to this line in install-pg-db, which is called from
the postinst script:

# Get a sysid
my $usesysid = $dbh->do("SELECT MAX(usesysid) + 1 FROM pg_shadow");

That always returns 1 (and a subsequent attempt to create a user with
usesysid=1 (correctly) fails).  As I have in use the usesysid values 1,
100, 101 I figure the correct answer is 102 (which is what I get if I put
that SQL into psql).

The postinst emits the diagnostic "...I could not
connect to the database server. ..." - which doesn't seem reasonable as
the same $dbh is previously used to (successfully) create the sympa

# Create database
eval {$dbh->do("CREATE DATABASE $database")};

What's really odd is the output from some diagnostic prints:

# Get a sysid
my $foo = $dbh->do("SELECT usesysid FROM pg_shadow WHERE
print "Max Id: $foo\n";
my $usesysid = $dbh->do("SELECT MAX(usesysid) + 1 FROM pg_shadow");
print "Calculated Id: $usesysid\n"; #DEBUG

Gives these:

Max Id: 1
Calculated Id: 1

I know that I could hack in a "$usesysid = 102", but that would (a) be
cheating and (b) not flush out the root cause.

Any ideas on what's up here, or how I might usefully extract more


Reply to: