Scidb init_syscat error


#1

Hi,

I have met an error message when I try to initialize SciDB system catalog.
After several testing, I figured out when this error happens.

I used a db name with capital letters in config.ini file, ran scidb.py init_syscat [the db name], and checked out if the db name put into Postgresql alright.
I reran scidb.py init_syscat [the db name] to reinitialize SciDB. The scidb.py printed out the message (‘cannot find [the db name]’). Actually the message came from Postgresql.
I think that scidb.py init_syscat uncapitalize db name and send it to Postgresql.

I use SciDB 12.12, Ubuntu 12.04 and Postgresql 8.4.
Please check it out.

Thank you.


#2

Just clarifying what you did here. You want to use the SciDB server name after the scidb.py init_syscat, not the postgres db name.

For example, my local config.ini looks like this:

[localst]
server-0=localhost,0
db_user=singleinstance
db_passwd=singleinstance
install_root=/opt/scidb/13.2
pluginsdir=/opt/scidb/13.2/lib/scidb/plugins
logconf=/opt/scidb/13.2/share/scidb/log4cxx.properties
base-path=/home/plumber/Devel/Data
tmp-path=/tmp
base-port=1239
execution-threads=1
result-prefetch-queue-size=1
result-prefetch-threads=1

[local1]
server-0=localhost,0
db_user=singleinstance
db_passwd=singleinstance
install_root=/opt/scidb/13.2
pluginsdir=/opt/scidb/13.2/lib/scidb/plugins
logconf=/opt/scidb/13.2/share/scidb/log4cxx.properties
base-path=/home/plumber/Devel/Data
tmp-path=/tmp
base-port=1239

[local2]
server-0=localhost,1
db_user=mydb
db_passwd=mydb
install_root=/opt/scidb/13.2
pluginsdir=/opt/scidb/13.2/lib/scidb/plugins
logconf=/opt/scidb/13.2/share/scidb/log4cxx.properties
base-path=/home/plumber/Devel/Data
tmp-path=/tmp
base-port=1239
interface=eth0

... etc for quite a few more server configurations ... 

When I want to completely re-init a SciDB server, I use something like this …

sudo -u postgres /opt/scidb/13.2/bin/scidb.py init_syscat local1

This creates a postgres database with the name taken from the SciDB server-name label.

plumber@wolvi:~$ sudo -u postgres psql 
psql (8.4.16)
Type "help" for help.

postgres=# \l
                                     List of databases
   Name    |     Owner      | Encoding |  Collation  |    Ctype    |   Access privileges   
-----------+----------------+----------+-------------+-------------+-----------------------
 local     | singleinstance | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 local1    | singleinstance | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 local2    | mydb           | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 local4    | mydb           | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 mydb      | mydb           | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 mydb4     | mydb           | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 postgres  | postgres       | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0 | postgres       | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                                   : postgres=CTc/postgres
 template1 | postgres       | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                                   : postgres=CTc/postgres
(9 rows)
postgres=# 

If you’re trying to name the postgres DBMS using scidb.py init_syscat, we’ve not been clear in the documentation.


#3

Thank you for your reply.

my config.ini :
[SciDBCluster]
server-0=192.168.10.2,0
server-1=192.168.10.3,1
server-2=192.168.10.4,1
db_user=scidb
db_passwd=scidb
install_root=/opt/scidb/12.12
metadata=/opt/scidb/12.12/share/scidb/meta.sql
pluginsdir=/opt/scidb/12.12/lib/scidb/plugins
logconf=/opt/scidb/12.12/share/scidb/log4cxx.properties
base-path=/home/cokeman/scidb/data
tmp-path=/tmp
base-port=1239
interface=eth0

When I tried to initialize SciDB Custer with this command…

sudo -u postgres /opt/scidb/12.12/bin/scidb.py init_syscat SciDBCluster

this command replied that it cannot find the database in postgres.
so I tried to find it in postgresql and the result was…

psql -l -U scidb

Name | Owner | Encoding | Collation || Ctype | Access Privileges

scidbcluster | scidb | UTF8 | …

I think the problem comes from that the posgresql has the db name with small letters.
When I made the scidb database with the name SciDBCluster in the first time, there was no problem and it worked well.
this problem happened only when I tried to re-initialize.

Thank you.


#4

Looking at it? We’ve become adjusted to using lower-case as a convention. Our bad.

So we need to -

( a ) Make the postgres database name respect the case of the supplied SciDB name, or …

( b ) Make SciDB consistently lower-case everything when it’s asking postgres about its databases.

Any thoughts on which folk would prefer? I think ( a ) > ( b ), but I’m biased.


#5

I prefer (a) to (b), too. :smile: