"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > Also, what about if the two servers get the 'begin' command at marginally > different times, then even: > > INSERT INTO foo VALUES (CURRENT_TIMESTAMP); > > Will be different on each different machine.
Yeah -- and gettimeofday() will be inconsistent for a slightly different reason. In fact, if a function depends on anything other than its arguments, you're probably going to have problems replicating it in a sane manner if you send the query string alone. One possible solution would be to dump the idea of sending query strings, and just send tuple-level changes. The basic idea is to execute a data-modifying txn locally, determine the tuple-level changes that it makes, rollback the txn locally, and then broadcast the tuple modifications to all the nodes in the cluster. Of course, it's a bit more complex than that (read the Postgres-R paper for more details), but that's the gist of it. ... which makes me think that rather than wasting our time discussing a more-or-less solved problem, we'd be better off helping to implement Postgres-R. > Even nastier, what about if the different postgres servers in the cluster > run on different architectures! That way you'd get different floating point > results on each machine... IMHO, that falls into the category of: "Dr., it hurts when I do this!" -- "Well, don't do it then" :-) Cheers, Neil -- Neil Conway <[EMAIL PROTECTED]> || PGP Key ID: DB3C29FC ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]