Changes between Version 5 and Version 6 of InstallationGuidelines/PostgreSQL


Ignore:
Timestamp:
09/18/10 12:20:07 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/PostgreSQL

    v5 v6  
    1 == Installation on PostgreSQL ==
     1[[TOC]]
     2= Installation on PostgreSQL =
    23Replacing the simple SQLite database with [http://www.postgresql.org PostgreSQL] allows greater scalability & the possibility of [wiki:UserGuidelinesGISData#PostgreSQLmanagement using PostGIS for spatial storage].
    34
    4 Suggest to use connection pools to reuse connections:
    5 {{{
    6 db=SQLDB('postgres://user:password@hostname/db',pools=20)
    7 }}}
     5== Install PostgreSQL ==
     6 * [wiki:InstallationGuidelinesGISDataLinux#PostGIS]
    87
    9 How many pools?
    10 {{{
    11 whatever you choose it always starts with one and grows with the
    12 number of concurrent requests up to the value of pools (the max number
    13 of concurrent pools). So pools should be the max number of concurrent
    14 requests you expect. That is the max value of:
    15 <number of requests/second> / <average time per request in seconcds>
    16 }}}
    17 
     8Enable automatic DB maintenance:
    189{{{
    1910vim /etc/postgresql/8.3/main/postgresql.conf
     
    2213}}}
    2314
    24 Also see:
    25  * [wiki:InstallationGuidelinesGISDataLinux#PostGIS]
    26  * [wiki:UserGuidelinesGISData#PostgreSQLmanagement]
    27 
     15== Configure PostgreSQL for Sahana Eden ==
    2816{{{
    2917su postgres
     
    3321}}}
    3422
    35 A set of docs for setting up on Ubuntu: http://www.web2pyslices.com/main/slices/take_slice/14
     23 * [wiki:UserGuidelinesGISData#PostgreSQLmanagement]
     24
     25== Configure Sahana Eden to use PostgreSQL ==
     26{{{
     27vim models/0000_config.py
     28deployment_settings.database.db_type = "postgres"
     29deployment_settings.database.port = "" # use default
     30deployment_settings.database.database = "sahana"
     31deployment_settings.database.username = "sahana"
     32deployment_settings.database.password = "mypassword"
     33deployment_settings.database.pool_size = 30
     34}}}
     35
     36'Connection pools' are used to reuse connections. How many pools should we use?
     37{{{
     38whatever you choose it always starts with one and grows with the number of concurrent requests up to the value of pools (the max number of concurrent pools).
     39So pools should be the max number of concurrent requests you expect. That is the max value of:
     40<number of requests/second> / <average time per request in seconds>
     41}}}
     42
     43== Also see ==
     44 * [wiki:InstallationGuidelinesGISDataLinux#PostGIS]
     45 * [wiki:UserGuidelinesGISData#PostgreSQLmanagement]
     46 * Setting up Web2Py with PostgreSQL on Ubuntu: http://www.web2pyslices.com/main/slices/take_slice/14
    3647
    3748----