Changes between Version 5 and Version 6 of InstallationGuidelines/PostgreSQL
- Timestamp:
- 09/18/10 12:20:07 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallationGuidelines/PostgreSQL
v5 v6 1 == Installation on PostgreSQL == 1 [[TOC]] 2 = Installation on PostgreSQL = 2 3 Replacing the simple SQLite database with [http://www.postgresql.org PostgreSQL] allows greater scalability & the possibility of [wiki:UserGuidelinesGISData#PostgreSQLmanagement using PostGIS for spatial storage]. 3 4 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] 8 7 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 8 Enable automatic DB maintenance: 18 9 {{{ 19 10 vim /etc/postgresql/8.3/main/postgresql.conf … … 22 13 }}} 23 14 24 Also see: 25 * [wiki:InstallationGuidelinesGISDataLinux#PostGIS] 26 * [wiki:UserGuidelinesGISData#PostgreSQLmanagement] 27 15 == Configure PostgreSQL for Sahana Eden == 28 16 {{{ 29 17 su postgres … … 33 21 }}} 34 22 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 {{{ 27 vim models/0000_config.py 28 deployment_settings.database.db_type = "postgres" 29 deployment_settings.database.port = "" # use default 30 deployment_settings.database.database = "sahana" 31 deployment_settings.database.username = "sahana" 32 deployment_settings.database.password = "mypassword" 33 deployment_settings.database.pool_size = 30 34 }}} 35 36 'Connection pools' are used to reuse connections. How many pools should we use? 37 {{{ 38 whatever 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). 39 So 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 36 47 37 48 ----