Re: Some newbie questions - Mailing list pgsql-hackers

From Greg Smith
Subject Re: Some newbie questions
Date
Msg-id Pine.GSO.4.64.0809090411310.572@westnet.com
Whole thread Raw
In response to Some newbie questions  (M2Y <mailtoyahoo@gmail.com>)
List pgsql-hackers
On Sun, 7 Sep 2008, M2Y wrote:

> Why does a replication solution need log shipping and why cant we just
> ship the transaction statements to a standby node?

Here's one of the classic examples of why that doesn't work:

create table x (d decimal);
insert into x values (random());

If you execute those same statements on two different nodes, they will end 
up with different values for the random number and therefore the nodes 
won't match anymore.  A similar issue shows up if you use functions that 
check the current system time, that will be slightly different between the 
two:  even if the clocks are perfectly synced, by the time the standy 
received the transaction it will be later than the original.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [gsmith@gregsmith.com: Re: [patch] GUC source file and line number]
Next
From: Heikki Linnakangas
Date:
Subject: Re: Synchronous Log Shipping Replication