Re: [galaxy-dev] Postgres renaming to postgresql

2013-07-17 Thread Nikos Sidiropoulos
Hi all

After updating to the last stable galaxy when I'm trying to upgrade the
database I'm getting the following message:

/steno-internal/projects/galaxy/galaxy-dist/eggs/SQLAlchemy-0.7.9-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/url.py:105:
SADeprecationWarning: The SQLAlchemy PostgreSQL dialect has been renamed
from 'postgres' to 'postgresql'. The new URL format is
postgresql[+driver]://:@/


If I change the line in universe_wsgi.ini from

database_connection = postgres://galaxy:password@localhost:5432/galaxydb

to

database_connection = postgresql://galaxy:password@localhost:5432/galaxydb

I get the following when restarting galaxy.

migrate.versioning.repository DEBUG 2013-07-17 15:23:53,462 Config:
{'db_settings': {'__name__': 'db_settings', 'required_dbs': '[]',
'version_table': 'migrate_version', 'repository_id': 'Galaxy'}}
galaxy.model.migrate.check ERROR 2013-07-17 15:23:53,463
database_connection contains an unknown SQLAlchemy database dialect:
postgresql
Traceback (most recent call last):
  File
"/steno-internal/projects/galaxy/galaxy-dist/lib/galaxy/webapps/galaxy/buildapp.py",
line 35, in app_factory
app = UniverseApplication( global_conf = global_conf, **kwargs )
  File "/steno-internal/projects/galaxy/galaxy-dist/lib/galaxy/app.py",
line 52, in __init__
create_or_verify_database( db_url, kwargs.get( 'global_conf', {} ).get(
'__file__', None ), self.config.database_engine_options, app=self )
  File
"/steno-internal/projects/galaxy/galaxy-dist/lib/galaxy/model/migrate/check.py",
line 50, in create_or_verify_database
engine = create_engine( url, **engine_options )
  File
"/steno-internal/projects/galaxy/galaxy-dist/eggs/SQLAlchemy-0.7.9-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/__init__.py",
line 338, in create_engine
return strategy.create(*args, **kwargs)
  File
"/steno-internal/projects/galaxy/galaxy-dist/eggs/SQLAlchemy-0.7.9-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/strategies.py",
line 64, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
  File
"/steno-internal/projects/galaxy/galaxy-dist/eggs/SQLAlchemy-0.7.9-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/dialects/postgresql/psycopg2.py",
line 312, in dbapi
psycopg = __import__('psycopg2')
ImportError: No module named psycopg2
Removing PID file web0.pid

I tried to install psycopg2 with no success but I guess it must have
already been there for postgres to work before the renaming.

Is there any (simple) solution to this that I'm missing?

Bests,
Nikos

p.s.: sorry for the first incomplete message



2013/7/17 Nikos Sidiropoulos 

> Hi all
>
> After updating to the last stable galaxy when I'm trying to upgrade the
> database I'm getting the following message:
>
> /steno-internal/projects/galaxy/galaxy-dist/eggs/SQLAlchemy-0.7.9-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/url.py:105:
> SADeprecationWarning: The SQLAlchemy PostgreSQL dialect has been renamed
> from 'postgres' to 'postgresql'. The new URL format is
> postgresql[+driver]://:@/
>
>
> If I change the line in universe_wsgi.ini from
>
> database_connection = postgresql://galaxy:password@localhost:5432/galaxydb
>
> to
>
>
___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

[galaxy-dev] Postgres renaming to postgresql

2013-07-17 Thread Nikos Sidiropoulos
Hi all

After updating to the last stable galaxy when I'm trying to upgrade the
database I'm getting the following message:

/steno-internal/projects/galaxy/galaxy-dist/eggs/SQLAlchemy-0.7.9-py2.6-linux-x86_64-ucs4.egg/sqlalchemy/engine/url.py:105:
SADeprecationWarning: The SQLAlchemy PostgreSQL dialect has been renamed
from 'postgres' to 'postgresql'. The new URL format is
postgresql[+driver]://:@/


If I change the line in universe_wsgi.ini from

database_connection = postgresql://galaxy:password@localhost:5432/galaxydb

to
___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] postgres connection

2012-12-10 Thread Coldren, Christopher D
That worked perfectly! Thanks Nate!

Chris



>> Galaxy dev:
>> 
>> I'm installing a local galaxy instance (Dec 4, 2012 vintage) and it is 
>> running well under mySQL, but I'm having trouble getting it to work with a 
>> postgres database.
>> 
>> I've done the following to create the db and provide permissions:
>> 
>> $ whoami
>> galaxy
>> $ createdb galaxy_prod4
>> $ psql galaxy_prod4
>> psql (8.4.13)
>> Type "help" for help.
>> galaxy_prod4=# CREATE ROLE galaxy_prod_role4 WITH PASSWORD 'milkweed';
>> CREATE ROLE
>> galaxy_prod4=# GRANT ALL PRIVILEGES ON DATABASE galaxy_prod4 to 
>> galaxy_prod_role4;
>> GRANT
>> galaxy_prod4=# ALTER ROLE galaxy_prod_role4 LOGIN;
>> ALTER ROLE
>> galaxy_prod4=# \du
>>List of roles
>> Role name |  Attributes  | Member of 
>> ---+--+---
>> galaxy| Superuser| {}
>>   : Create role
>>   : Create DB  
>> galaxy_prod_role  | Cannot login | {}
>> galaxy_prod_role4 |  | {}
>> mydb_role | Cannot login | {}
>> mydb_user |  | {}
>> postgres  | Superuser| {}
>>   : Create role
>>   : Create DB  
>> galaxy_prod4=# \l
>>   List of databases
>> Name |  Owner   | Encoding |  Collation  |Ctype|  Access 
>> privileges   
>> --+--+--+-+-+--
>> galaxy_prod3 | galaxy   | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/galaxy
>>: 
>> galaxy=CTc/galaxy
>>: 
>> galaxy_prod_role=CTc/galaxy
>> galaxy_prod4 | galaxy   | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/galaxy
>>: 
>> galaxy=CTc/galaxy
>>: 
>> galaxy_prod_role4=CTc/galaxy
>> 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
>> (5 rows)
>> 
>> 
>> Looks promising, right? 
>> 
>> My universe_wsgi.ini has the following entry:
>> 
>> 
>> database_connection = 
>> postgres:///galaxy_prod_role4:milkweed@127.0.0.1:5432/galaxy_prod4
> 
> Hi Chris,
> 
> You're a field off in your URL, try this:
> 
> postgres://galaxy_prod_role4:milkweed@127.0.0.1:5432/galaxy_prod4
> 
> --nate
> 
>> 
>> and started the application, but it failed with:
>> 
>> OperationalError: (OperationalError) FATAL:  database 
>> "galaxy_prod_role4:milkweed@127.0.0.1:5432/galaxy_prod4" does not exist
>> 
>> commenting the database_connection line out allows galaxy to start, using 
>> mySQL I presume. Any ideas? This is my first time configuring something like 
>> this.
>> 
>> Thank you!
>> Chris
>> ___
>> Please keep all replies on the list by using "reply all"
>> in your mail client.  To manage your subscriptions to this
>> and other Galaxy lists, please use the interface at:
>> 
>> http://lists.bx.psu.edu/
> 
> 
> 



___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/


Re: [galaxy-dev] postgres connection

2012-12-10 Thread Nate Coraor
On Dec 7, 2012, at 6:05 PM, Coldren, Christopher D wrote:

> Galaxy dev:
> 
> I'm installing a local galaxy instance (Dec 4, 2012 vintage) and it is 
> running well under mySQL, but I'm having trouble getting it to work with a 
> postgres database.
> 
> I've done the following to create the db and provide permissions:
> 
> $ whoami
> galaxy
> $ createdb galaxy_prod4
> $ psql galaxy_prod4
> psql (8.4.13)
> Type "help" for help.
> galaxy_prod4=# CREATE ROLE galaxy_prod_role4 WITH PASSWORD 'milkweed';
> CREATE ROLE
> galaxy_prod4=# GRANT ALL PRIVILEGES ON DATABASE galaxy_prod4 to 
> galaxy_prod_role4;
> GRANT
> galaxy_prod4=# ALTER ROLE galaxy_prod_role4 LOGIN;
> ALTER ROLE
> galaxy_prod4=# \du
> List of roles
>  Role name |  Attributes  | Member of 
> ---+--+---
>  galaxy| Superuser| {}
>: Create role
>: Create DB  
>  galaxy_prod_role  | Cannot login | {}
>  galaxy_prod_role4 |  | {}
>  mydb_role | Cannot login | {}
>  mydb_user |  | {}
>  postgres  | Superuser| {}
>: Create role
>: Create DB  
> galaxy_prod4=# \l
>List of databases
>  Name |  Owner   | Encoding |  Collation  |Ctype|  Access 
> privileges   
> --+--+--+-+-+--
>  galaxy_prod3 | galaxy   | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/galaxy
> : 
> galaxy=CTc/galaxy
> : 
> galaxy_prod_role=CTc/galaxy
>  galaxy_prod4 | galaxy   | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/galaxy
> : 
> galaxy=CTc/galaxy
> : 
> galaxy_prod_role4=CTc/galaxy
>  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
> (5 rows)
> 
> 
> Looks promising, right? 
> 
> My universe_wsgi.ini has the following entry:
> 
> 
> database_connection = 
> postgres:///galaxy_prod_role4:milkweed@127.0.0.1:5432/galaxy_prod4

Hi Chris,

You're a field off in your URL, try this:

postgres://galaxy_prod_role4:milkweed@127.0.0.1:5432/galaxy_prod4

--nate

> 
> and started the application, but it failed with:
> 
> OperationalError: (OperationalError) FATAL:  database 
> "galaxy_prod_role4:milkweed@127.0.0.1:5432/galaxy_prod4" does not exist
> 
> commenting the database_connection line out allows galaxy to start, using 
> mySQL I presume. Any ideas? This is my first time configuring something like 
> this.
> 
> Thank you!
> Chris
> ___
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
> 
>  http://lists.bx.psu.edu/


___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/


[galaxy-dev] postgres connection

2012-12-07 Thread Coldren, Christopher D
Galaxy dev:

I'm installing a local galaxy instance (Dec 4, 2012 vintage) and it is running 
well under mySQL, but I'm having trouble getting it to work with a postgres 
database.

I've done the following to create the db and provide permissions:

$ whoami
galaxy
$ createdb galaxy_prod4
$ psql galaxy_prod4
psql (8.4.13)
Type "help" for help.
galaxy_prod4=# CREATE ROLE galaxy_prod_role4 WITH PASSWORD 'milkweed';
CREATE ROLE
galaxy_prod4=# GRANT ALL PRIVILEGES ON DATABASE galaxy_prod4 to 
galaxy_prod_role4;
GRANT
galaxy_prod4=# ALTER ROLE galaxy_prod_role4 LOGIN;
ALTER ROLE
galaxy_prod4=# \du
List of roles
 Role name |  Attributes  | Member of
---+--+---
 galaxy| Superuser| {}
   : Create role
   : Create DB
 galaxy_prod_role  | Cannot login | {}
 galaxy_prod_role4 |  | {}
 mydb_role | Cannot login | {}
 mydb_user |  | {}
 postgres  | Superuser| {}
   : Create role
   : Create DB
galaxy_prod4=# \l
   List of databases
 Name |  Owner   | Encoding |  Collation  |Ctype|  Access 
privileges
--+--+--+-+-+--
 galaxy_prod3 | galaxy   | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/galaxy
: 
galaxy=CTc/galaxy
: 
galaxy_prod_role=CTc/galaxy
 galaxy_prod4 | galaxy   | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/galaxy
: 
galaxy=CTc/galaxy
: 
galaxy_prod_role4=CTc/galaxy
 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
(5 rows)


Looks promising, right?

My universe_wsgi.ini has the following entry:


database_connection = 
postgres:///galaxy_prod_role4:milkweed@127.0.0.1:5432/galaxy_prod4

and started the application, but it failed with:

OperationalError: (OperationalError) FATAL:  database 
"galaxy_prod_role4:milkweed@127.0.0.1:5432/galaxy_prod4"
 does not exist

commenting the database_connection line out allows galaxy to start, using mySQL 
I presume. Any ideas? This is my first time configuring something like this.

Thank you!
Chris
___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Re: [galaxy-dev] postgres

2012-03-09 Thread Dannon Baker
Yes, see the table 'job'.  You may or may not find this helpful, but here's a 
big database schema from our wiki:

http://wiki.g2.bx.psu.edu/DataModel?action=AttachFile&do=view&target=galaxy_schema.png

-Dannon


On Mar 9, 2012, at 8:00 AM, christin weinberg wrote:

> Hi,
> 
> thanks for the answer.  I have one more question. Is there one main table (in 
> the database), which creates one key for one job and this key is allocated 
> over other tables?
> 
> Thank you!
> 
> Best,
> Christin
> 
> Am 08.03.2012 16:40, schrieb Björn Grüning:
>> Hi Christin,
>> 
>>> I would like to clarify whether we have understood something about the
>>> database correctly. Is is right that all calculations with galaxy are
>>> stored as a link in the database. And the data are stored somewhereelse?
>> Yes, kind of :)
>> 
>>> Is it possible to store the data only in the database?
>> No and its advisable to do so. Galaxy operates on files and they can be
>> huge. It does not make much sense to store such data in a database.
>> 
>> Best,
>> Bjoern
>> 
>>> For some advice, I am very grateful.
>>> 
>>> Best regards,
>>> Christin
>>> 
> 
> 
> -- 
> 
> Christin Weinberg
> Institute for Applied Computer Science (IACS)
> FH Stralsund - University of Applied Sciences
> 
> Phone: +49 3831 456948
> E-Mail : christin.weinb...@fh-stralsund.de
> 
> ___
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
> 
> http://lists.bx.psu.edu/


___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/


Re: [galaxy-dev] postgres

2012-03-09 Thread christin weinberg

Hi,

thanks for the answer.  I have one more question. Is there one main 
table (in the database), which creates one key for one job and this key 
is allocated over other tables?


Thank you!

Best,
Christin

Am 08.03.2012 16:40, schrieb Björn Grüning:

Hi Christin,


I would like to clarify whether we have understood something about the
database correctly. Is is right that all calculations with galaxy are
stored as a link in the database. And the data are stored somewhereelse?

Yes, kind of :)


Is it possible to store the data only in the database?

No and its advisable to do so. Galaxy operates on files and they can be
huge. It does not make much sense to store such data in a database.

Best,
Bjoern


For some advice, I am very grateful.

Best regards,
Christin




--

Christin Weinberg
Institute for Applied Computer Science (IACS)
FH Stralsund - University of Applied Sciences

Phone: +49 3831 456948
E-Mail : christin.weinb...@fh-stralsund.de

___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

 http://lists.bx.psu.edu/

Re: [galaxy-dev] postgres

2012-03-08 Thread Björn Grüning
Hi Christin,

> I would like to clarify whether we have understood something about the 
> database correctly. Is is right that all calculations with galaxy are 
> stored as a link in the database. And the data are stored somewhereelse? 

Yes, kind of :)

> Is it possible to store the data only in the database?

No and its advisable to do so. Galaxy operates on files and they can be
huge. It does not make much sense to store such data in a database.

Best,
Bjoern

> For some advice, I am very grateful.
> 
> Best regards,
> Christin
> 

-- 
Björn Grüning
Albert-Ludwigs-Universität Freiburg
Institute of Pharmaceutical Sciences
Pharmaceutical Bioinformatics
Hermann-Herder-Strasse 9
D-79104 Freiburg i. Br.

Tel.:  +49 761 203-4872
Fax.:  +49 761 203-97769
E-Mail: bjoern.gruen...@pharmazie.uni-freiburg.de
Web: http://www.pharmaceutical-bioinformatics.org/

___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

[galaxy-dev] postgres

2012-03-08 Thread christin weinberg

Dear all,
I would like to clarify whether we have understood something about the 
database correctly. Is is right that all calculations with galaxy are 
stored as a link in the database. And the data are stored somewhereelse? 
Is it possible to store the data only in the database?


For some advice, I am very grateful.

Best regards,
Christin

--

Christin Weinberg
Institute for Applied Computer Science (IACS)
FH Stralsund - University of Applied Sciences

Phone: +49 3831 456948
E-Mail : christin.weinb...@fh-stralsund.de

___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

 http://lists.bx.psu.edu/


Re: [galaxy-dev] postgres user change problem

2012-01-30 Thread Nate Coraor
On Jan 20, 2012, at 9:04 AM, Holger Klein wrote:

> Dear all,
> 
> due to some work on the user management of our servers we had to rename
> the user galaxy runs as. Up to now we used ident as postgres
> authentication method, meaning that here postgres expects unix username
> "galaxy" to have permissions of "galaxy" postgres user.
> 
> The entry in universe_wsgi.ini is simply:
> database_connection = postgres:///galaxy?host=/var/run/postgresql
> 
> After the renaming, the new user "galaxynew" didn't get access at all at
> first. Now I tried two things:
> - adding a user "galaxynew" to postgres with permissions for database galaxy
> and
> - dumping the contents of database "galaxy" into a file and re-reading
> this into database "galaxynew", which is owned by the user "galaxynew"
> and of course changing the config file line to
> database_connection = postgres:///galaxynew?host=/var/run/postgresql
> 
> In both cases I end up with an error during startup of galaxy:
> [...]
> WARNING 2012-01-20 14:46:55,556 Error closing cursor: current
> transaction is aborted, commands ignored until end of transaction block
> [...]
> ProgrammingError: (ProgrammingError) permission denied for relation
> migrate_version
> 'SELECT migrate_version.repository_id, migrate_version.repository_path,
> migrate_version.version \nFROM migrate_version \nWHERE
> migrate_version.repository_id = %(repository_id_1)s' {'repository_id_1':
> 'Galaxy'}
> 
> (complete traceback below).
> 
> Does anyone have a hint on how I could fix this?

Hi Holger,

I'd use \dp in psql to check the table and sequence permissions.  Most likely 
the restore set permissions on all the db objects back to the 'galaxy' postgres 
role even though the database itself is owned by galaxynew.

--nate

> 
> Cheers,
> Holger
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> sqlalchemy.pool.QueuePool.0x...8d10 WARNING 2012-01-20 14:46:55,556
> Error closing cursor: current transaction is aborted, commands ignored
> until end of transaction block
> 
> Traceback (most recent call last):
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/lib/galaxy/web/buildapp.py",
> line 82, in app_factory
>app = UniverseApplication( global_conf = global_conf, **kwargs )
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/lib/galaxy/app.py", line
> 39, in __init__
>create_or_verify_database( db_url, kwargs.get( 'global_conf', {}
> ).get( '__file__', None ), self.config.database_engine_options )
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/lib/galaxy/model/migrate/check.py",
> line 99, in create_or_verify_database
>db_schema = schema.ControlledSchema( engine, migrate_repository )
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/schema.py",
> line 24, in __init__
>self._load()
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/schema.py",
> line 41, in _load
>self.table.c.repository_id == str(self.repository.id)))
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
> line 1202, in execute
>return connection.execute(statement, *multiparams, **params)
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
> line 824, in execute
>return Connection.executors[c](self, object, multiparams, params)
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
> line 874, in _execute_clauseelement
>return self.__execute_context(context)
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
> line 896, in __execute_context
>self._cursor_execute(context.cursor, context.statement,
> context.parameters[0], context=context)
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
> line 950, in _cursor_execute
>self._handle_dbapi_exception(e, statement, parameters, cursor, context)
>  File
> "/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
> line 931, in _handle_dbapi_exception
>raise exc.DBAPIError.instance(statement, parameters, e,
> connection_invalidated=is_disconnect)
> ProgrammingError: (ProgrammingError) permission denied for relation
> migrate_version
> 'SELECT migrate_version.repository_id, migrate_version.repository_path,
> migrate_version.version \nFROM migrate_version \nWHERE
> migrate_version.repository_id = %(repository_id_1)s' {'repository_id_1':
> 'Galaxy'}
> 
> 
> 
> -- 
> Dr. Holger Klein
> Core Facility Bioinformatics
> Institute of Molecular Biology gGmbH (IMB)
> http://www.imb-mainz.de/
> Tel: +49(6131) 39 21511
> ___
> Ple

[galaxy-dev] postgres user change problem

2012-01-20 Thread Holger Klein
Dear all,

due to some work on the user management of our servers we had to rename
the user galaxy runs as. Up to now we used ident as postgres
authentication method, meaning that here postgres expects unix username
"galaxy" to have permissions of "galaxy" postgres user.

The entry in universe_wsgi.ini is simply:
database_connection = postgres:///galaxy?host=/var/run/postgresql

After the renaming, the new user "galaxynew" didn't get access at all at
first. Now I tried two things:
- adding a user "galaxynew" to postgres with permissions for database galaxy
and
- dumping the contents of database "galaxy" into a file and re-reading
this into database "galaxynew", which is owned by the user "galaxynew"
and of course changing the config file line to
database_connection = postgres:///galaxynew?host=/var/run/postgresql

In both cases I end up with an error during startup of galaxy:
[...]
WARNING 2012-01-20 14:46:55,556 Error closing cursor: current
transaction is aborted, commands ignored until end of transaction block
[...]
ProgrammingError: (ProgrammingError) permission denied for relation
migrate_version
 'SELECT migrate_version.repository_id, migrate_version.repository_path,
migrate_version.version \nFROM migrate_version \nWHERE
migrate_version.repository_id = %(repository_id_1)s' {'repository_id_1':
'Galaxy'}

(complete traceback below).

Does anyone have a hint on how I could fix this?

Cheers,
Holger











sqlalchemy.pool.QueuePool.0x...8d10 WARNING 2012-01-20 14:46:55,556
Error closing cursor: current transaction is aborted, commands ignored
until end of transaction block

Traceback (most recent call last):
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/lib/galaxy/web/buildapp.py",
line 82, in app_factory
app = UniverseApplication( global_conf = global_conf, **kwargs )
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/lib/galaxy/app.py", line
39, in __init__
create_or_verify_database( db_url, kwargs.get( 'global_conf', {}
).get( '__file__', None ), self.config.database_engine_options )
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/lib/galaxy/model/migrate/check.py",
line 99, in create_or_verify_database
db_schema = schema.ControlledSchema( engine, migrate_repository )
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/schema.py",
line 24, in __init__
self._load()
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/schema.py",
line 41, in _load
self.table.c.repository_id == str(self.repository.id)))
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
line 1202, in execute
return connection.execute(statement, *multiparams, **params)
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
line 824, in execute
return Connection.executors[c](self, object, multiparams, params)
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
line 874, in _execute_clauseelement
return self.__execute_context(context)
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
line 896, in __execute_context
self._cursor_execute(context.cursor, context.statement,
context.parameters[0], context=context)
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
line 950, in _cursor_execute
self._handle_dbapi_exception(e, statement, parameters, cursor, context)
  File
"/local/data/home/galaxy/galaxy-dist-2011-11-23/eggs/SQLAlchemy-0.5.6_dev_r6498-py2.6.egg/sqlalchemy/engine/base.py",
line 931, in _handle_dbapi_exception
raise exc.DBAPIError.instance(statement, parameters, e,
connection_invalidated=is_disconnect)
ProgrammingError: (ProgrammingError) permission denied for relation
migrate_version
 'SELECT migrate_version.repository_id, migrate_version.repository_path,
migrate_version.version \nFROM migrate_version \nWHERE
migrate_version.repository_id = %(repository_id_1)s' {'repository_id_1':
'Galaxy'}



-- 
Dr. Holger Klein
Core Facility Bioinformatics
Institute of Molecular Biology gGmbH (IMB)
http://www.imb-mainz.de/
Tel: +49(6131) 39 21511
___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/