Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 10 and Version 11 of PostgreSql


Ignore:
Timestamp:
01/06/07 14:49:22 (12 years ago)
Author:
jorge.vargas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PostgreSql

    v10 v11  
    1 = postgreSQL Setup = 
    2 See DataBaseInstalation 
    3  
    4 PostgreSQL offers a lot of advantages over most other open source databases, but is somewhat less familiar to many people.   
    5  
    6 Here's a quick guide to using PostgreSQL with Turbogears. 
    7  
    8  
    9 == The DSN == 
    10  
    11 The basic form of a DSN for using PostgreSQL is as follows: 
    12  
    13 {{{ 
    14 postgres://user:passwd@host:5432/dbname 
    15 }}} 
    16  
    17 5432 is the default port for PostgreSQL, but may vary depending on configuration.  If your PostgreSQL is listening on its default port, this can be absent from the DSN making it simpler: 
    18  
    19 {{{ 
    20 postgres://user:passwd@host/dbname 
    21 }}} 
    22  
    23  
    24 == Using a Unix domain socket == 
    25 As long as you don't require remote access, using a local socket has a lot of advantages over TCP sockets: 
    26  
    27  * Up to 25% faster 
    28  * Easier to secure (uses filesystem permissions) 
    29  * Doesn't waste a TCP port 
    30  
    31 With PostgreSQL, if the hostname starts with a /, then the hostname is taken to be an absolute path to a Unix domain 
    32 socket rather than a hostname.  However, there are (as of this writing), bugs in the DSN parser for SQLObject that fail 
    33 to separate the socket path from the database name.  A DSN like this works around that issue: 
    34  
    35 {{{ 
    36 postgres:///dbname?host=/path/to/socket 
    37 }}} 
    38  
    39 Note that I'm not specifying a username or password.  If you are sharing the socket with many users, you will want to do so,  
    40 but if you are running your own instance of PostgreSQL (which I recommend) then you can forgo database-level authentication  
    41 schemes and just use Unix file permissions to restrict access. 
    42  
    43  
    44 == Known issues == 
    45  
    46  * Catwalk has a bug that causes a hang the first time the application is started with Catwalk mounted.   
    47    The workaround is fairly straightforward: simply create the requisite Catwalk tables by hand then re-run 
    48    the application.   
    49  
    50    The required SQL (at the time of this writing) is: 
    51    {{{ 
    52    CREATE TABLE catwalk_state_table ( 
    53      id SERIAL PRIMARY KEY NOT NULL, 
    54      state BYTEA 
    55    ); 
    56    }}} 
    57  
    58    Use the psql command to run this query and you'll be set. 
     1please see http://docs.turbogears.org/1.0/DatabasePostgres