#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    1
    Rep Power
    0

    replication woes


    I have a site running on php/postgres, no problems there untill now when I need to replicate the db over several servers. Does anyone know of a decent solution for this? Because of foreign keys/unicode none of my own attempts have succeeded and likewise with all the 2rd party efforts (dbmirror etc).
    Is it possible to replicate by simply copying files accross? I've seen docs about doing this on mysql.. otherwise what could you suggest? Please..
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    A stable replication solution is still not fully available with the "free" PostgreSQL. However, if you purchase one of the paid support plans at www.pgsql.com , you get a commercial replication solution included.

    Also, notice on the front page of www.pgsql.com there is a link to Lanux, who also provide a PostgreSQL replication solution.

    For the free/open source version of PostgreSQL replication, you can see the in-development status at http://gborg.postgresql.org/project/...rojdisplay.php


    Do NOT replicate your PostgreSQL database by copying files. This will almost definitely cause data corruption. If you really need a quick and simple solution, and your replication does not need to be real-time, then you should schedule a shell script to periodically lock the database, run a complete dump, and then run a complete restore at the receiving location. Obviously, this solution will not scale, but at least it will be somewhat safe.
    The real n-tier system:

    FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

    Amazon wishlist -- rycamor (at) gmail.com

IMN logo majestic logo threadwatch logo seochat tools logo