[GRASS-dev] [GRASS GIS] #1951: Postgres database login problems in db.databases

GRASS GIS trac at osgeo.org
Sat Apr 27 07:25:27 PDT 2013


#1951: Postgres database login problems in db.databases
---------------------------+------------------------------------------------
 Reporter:  davidinosauro  |       Owner:  grass-dev@…              
     Type:  defect         |      Status:  new                      
 Priority:  normal         |   Milestone:                           
Component:  Default        |     Version:  svn-trunk                
 Keywords:                 |    Platform:  Linux                    
      Cpu:  x86-64         |  
---------------------------+------------------------------------------------
 Just installed grass7 (freshly compiled) and ran into this problem: with
 some modules, grass seems unable to login into the Postgres db, as it
 tries to connect as a different user:


 `v.db.reconnect.all` gives me a few of theese errors:
 {{{
 DBMI-PostgreSQL driver error:
 Connection failed.
 FATAL:  role "davide" does not exist

 ERROR: Unable to create database <host=localhost,dbname=test,port=5432> by
     driver <pg>
 }}}
 Where "davide" is actually my username, while I previously ran

 `db.login user=postgres password=***`

 in fact, most modules correctly connect to db (I can run `v.in.ogr` and
 import a shapefile, which will properly create a table on db)

 However, the following modules (at least) fail with that error:
   * `v.db.reconnect.all -cd`
   * `db.databases` (which I found was called by v.db.reconnect.all)
   * `grass.pygrass.vector.VectorTopo.open` called from the python shell

 I did't dig deep into the problem, but I guess the wrong username could be
 the result of calling the db client without explicitly specifying the
 username.

 Cheers
 Davide Kirchner

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1951>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list