PostgreSQL database engine

3 views
Skip to first unread message

Rudá Porto Filgueiras (ruda_porto)

unread,
Mar 30, 2009, 12:43:21 AM3/30/09
to Cluemapper-dev
ClueMapper can be customized to use PostgreSQL as default database
engine?

If the answer is not, there is any plan to support PostgreSQL as
default database?
I'm interested in help this effort.

We need this to make it play with our existing members user base, at
same time used from Plone with SQLPasPlugin. My plan is to use
ClueMapper to host all our internal (board) and community projects.

Cheers,

--
Rudá Porto Filgueiras
Director of On-Line Actions
Brazilian Python Foundation

Rocky Burt

unread,
Mar 30, 2009, 6:07:06 AM3/30/09
to cluemap...@googlegroups.com

There's not currently any direct support for PostgreSQL.  There are two parts of ClueMapper that would need to see this support and they are:
  1) Trac itself
  2) Integrating ClueMapper components

For #1, I am aware that Trac does have postgresql support.  I'm not currently familiar with how/if it can support multiple instances inside the same postgres db though.

For #2, the ClueMapper code uses sqlalchemy for it's logic which means switching to any sqlalchemy-supported db should just be a matter of configuration.  But this configuration has not yet been set up.

Bottom line, patches are welcome although at some point this support will be added anyways (as soon as I need it).

- Rocky

Rudá Porto Filgueiras

unread,
Mar 30, 2009, 1:06:11 PM3/30/09
to cluemap...@googlegroups.com
On Mon, Mar 30, 2009 at 7:07 AM, Rocky Burt <ro...@serverzen.com> wrote:
>
> There's not currently any direct support for PostgreSQL.  There are two
> parts of ClueMapper that would need to see this support and they are:
>   1) Trac itself
>   2) Integrating ClueMapper components
>
> For #1, I am aware that Trac does have postgresql support.  I'm not
> currently familiar with how/if it can support multiple instances inside the
> same postgres db though.

Maybe it can be possible using "schemas" namespace, but the simple way
is each project with your own DB like is with SQLite. But to do this,
there is need to connect with "super user" before the creation of new
databases on the fly.

> For #2, the ClueMapper code uses sqlalchemy for it's logic which means
> switching to any sqlalchemy-supported db should just be a matter of
> configuration.  But this configuration has not yet been set up.

I found some places where cluemapper.db are hardcoded in ClueMapper
(trunk) package (ClueBin and ClueTimer alredy use sqlalchemy).

$ grep -rn cluemapper.db *

src/ClueMapper/src/clue/app/controller.py:167: shared_db =
pb(os.path.join('etc', 'cluemapper', 'cluemapper.db'))
src/ClueMapper/src/clue/app/project.py:383:
pb(os.path.join('etc', 'cluemapper', 'cluemapper.db'))
src/ClueMapper/src/clue/app/project.py:399: dbpath =
pb(os.path.join('etc', 'cluemapper', 'cluemapper.db'))
src/ClueMapper/src/clue/app/admin.py:385:
os.path.join(workingdir, 'etc', 'cluemapper', 'cluemapper.db')
src/ClueMapper/src/clue/app/tracplugins/user.py:14:
'sqlite:etc/cluemapper/cluemapper.db',
src/ClueMapper/src/clue/app/__init__.py:131: shared_db =
pb(os.path.join('etc', 'cluemapper', 'cluemapper.db'))

One simple solution is use a global function to find database
connection based on cluemaper.ini configuration option, and change
ClueMapper, ClueBin and ClueTimer to use it.

ClueBin and ClueTimer both has some duplicade code to deal with engine
/ session creation and cache.
I guess this should be will in one place (ClueMapper) ?

> Bottom line, patches are welcome although at some point this support will be
> added anyways (as soon as I need it).

Ok. Since we agree what need to be done and how it must be done, I can
write some patches and test code too. ;-)

Cheers,

Rocky Burt

unread,
Apr 1, 2009, 11:32:40 AM4/1/09
to cluemap...@googlegroups.com
On Mon, Mar 30, 2009 at 2:36 PM, Rudá Porto Filgueiras <rud...@gmail.com> wrote:

ClueBin and ClueTimer both has some duplicade code to deal with engine
/ session creation and cache.
I guess this should be will in one place (ClueMapper) ?


ClueBin and ClueTimer both should not depend on ClueMapper.  They were created to be separate entities.  Any integration with those 2 should be done inside ClueMapper itself.  That being said, if all 3 do need to share some libs, then perhaps a separate library component should be started.

- Rocky

Rudá Porto Filgueiras (ruda_porto)

unread,
Apr 1, 2009, 9:50:31 PM4/1/09
to Cluemapper-dev
ClueStorage?

> - Rocky

--
Rudá Porto Filgueiras
Reply all
Reply to author
Forward
0 new messages