Thread

  1. Alternative replication method.

    Mike Benoit <mikeb@netnation.com> — 2003-06-24T21:20:36Z

    Has anyone used PostgreSQL with Drbd
    (http://www.complang.tuwien.ac.at/reisner/drbd/)?
    
    They claim it works with PostgreSQL. Do the PostgreSQL hackers forsee
    any issues with this type of replication method? 
    
    Do you think this method (combined with some other HA utilities) could
    work well as a "hot-spare" database server?
    
    
    -- 
    Best Regards,
     
    Mike Benoit
    NetNation Communications Inc.
    Systems Engineer
    Tel: 604-684-6892 or 888-983-6600
     ---------------------------------------
     
     Disclaimer: Opinions expressed here are my own and not 
     necessarily those of my employer
    
    
    
  2. Re: Alternative replication method.

    Jonathan Bartlett <johnnyb@eskimo.com> — 2003-06-24T21:26:50Z

    I haven't used this.  It would probably work, but there's also another
    way just using plain SCSI.  You can attach both your main machine and a
    hot standby to an external RAID array.  When the main machine goes down,
    just mount the RAID array yourself.  However, you should also install a
    serial power switch so that you can kill the other server dead to prevent
    possible damage.
    
    Jon
    
    On 24 Jun 2003, Mike Benoit wrote:
    
    > Has anyone used PostgreSQL with Drbd
    > (http://www.complang.tuwien.ac.at/reisner/drbd/)?
    >
    > They claim it works with PostgreSQL. Do the PostgreSQL hackers forsee
    > any issues with this type of replication method?
    >
    > Do you think this method (combined with some other HA utilities) could
    > work well as a "hot-spare" database server?
    >
    >
    > --
    > Best Regards,
    >
    > Mike Benoit
    > NetNation Communications Inc.
    > Systems Engineer
    > Tel: 604-684-6892 or 888-983-6600
    >  ---------------------------------------
    >
    >  Disclaimer: Opinions expressed here are my own and not
    >  necessarily those of my employer
    >
    >
    > ---------------------------(end of broadcast)---------------------------
    > TIP 2: you can get off all lists at once with the unregister command
    >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
    >
    
    
    
  3. Re: Alternative replication method.

    Tom Lane <tgl@sss.pgh.pa.us> — 2003-06-25T14:44:11Z

    Mike Benoit <mikeb@netnation.com> writes:
    > Has anyone used PostgreSQL with Drbd
    > (http://www.complang.tuwien.ac.at/reisner/drbd/)?
    
    Does it guarantee preservation of write ordering?
    
    			regards, tom lane
    
    
  4. Re: Alternative replication method.

    Mike Benoit <mikeb@netnation.com> — 2003-06-25T15:42:04Z

    According to section 5 in this:
    
    http://www.complang.tuwien.ac.at/reisner/drbd/publications/drbd_paper_for_LK7.pdf
    
    it looks like it does guarantee write order.
    
    <snip>
    5 Write ordering
    Some file systems require that certain blocks hit the media in a
    determined order, for example a JFS
    needs to write a transaction (the commit record must be last) into the
    journal before it does any updates
    to the home locations.
    It does this by postponing the home location updates until it knows that
    the writes to the journal are
    on stable storage. (This is done with wait_on_buffer() and/or
    buffer_uptodate())
    >From the DRBD's point of view the question is, which blocks might be
    reordered when writing to the
    secondary's disk.
    To ensure exactly the same write order as on the primary, we must use
    the following scheme:
        1. Get a block from the network and put it onto the buffer cache.
        2. Write that buffer and wait for IO completion.
        3. Continue with 1.
    ...
    </snip>
    
    On Wed, 2003-06-25 at 07:44, Tom Lane wrote:
    > Mike Benoit <mikeb@netnation.com> writes:
    > > Has anyone used PostgreSQL with Drbd
    > > (http://www.complang.tuwien.ac.at/reisner/drbd/)?
    > 
    > Does it guarantee preservation of write ordering?
    > 
    > 			regards, tom lane
    -- 
    Best Regards,
     
    Mike Benoit
    NetNation Communications Inc.
    Systems Engineer
    Tel: 604-684-6892 or 888-983-6600
     ---------------------------------------
     
     Disclaimer: Opinions expressed here are my own and not 
     necessarily those of my employer