From: | Chris Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-advocacy(at)postgresql(dot)org |
Subject: | Re: Open source databases '60 per cent cheaper' |
Date: | 2006-11-27 18:00:44 |
Message-ID: | 60ejroahwz.fsf@dba2.int.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-advocacy pgsql-hackers |
neilc(at)samurai(dot)com (Neil Conway) writes:
> On Mon, 2006-11-27 at 11:39 +0100, Markus Schaber wrote:
>> Hmm, I guess that the new RETURNING feature of PostgreSQL 8.2 can help
>> with this problem.
>
> I don't see how. The basic problem is that SQL is nondeterministic in
> general; you can't safely assume that evaluating the same sequence of
> SQL statements on all nodes will yield the same final database state.
Well, RETURNING means that there's some place which receives the
return set, which means that there is, in principle, a place where the
data would be capturable.
But it is important to point out that the "nondeterministic"
possibilities do not end with NOW() or CURRENT_TIMESTAMP; other
nondeterministic things that can cause trouble include:
a) A sequence value, which is set *somewhat* invisibly,
b) A query of the form
insert into some_table (select * from a_table);
where the SELECT subquery is not of the form:
SELECT [fields] FROM [a_table] WHERE [Fully Deterministic Criterion]
ORDER BY [some criterion suitable to be a primary key for the result set]
LIMIT [anything];
If you could capture the RETURNING data, and replicate that, well,
that at least provides a way to get around the nondeterminism problem.
That would work out well for both INSERT and DELETE. I'm not sure
it'll work as well for UPDATE; that doesn't return both old and new
column values :-(.
--
"cbbrowne","@","acm.org"
http://linuxdatabases.info/info/internet.html
"Problem solving under linux has never been the circus that it is
under AIX." -- Pete Ehlke in comp.unix.aix
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2006-11-27 23:14:11 | Re: Postgres Team: Thank You All |
Previous Message | Andreas Pflug | 2006-11-27 17:59:15 | Re: Importand points about PostgreSQL |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-11-27 18:02:50 | Re: [CORE] RC1 blocker issues |
Previous Message | Jim C. Nasby | 2006-11-27 17:54:33 | Re: [CORE] RC1 blocker issues |