On Tue, Feb 25, 2003 at 04:36:56PM -0700, Ed L. wrote:
> I'm doing a little testing of rserv here. Does anyone recognize the
> issue with this error?
>
> $ InitRservTest
> $ psql -d master -c "update test set k = k + 1000"
> UPDATE 100
> $ psql -d master -c "update test set k = k - 1000"
> UPDATE 100
> $ psql -d master -c "update test set k = k + 1000"
> ERROR: _rserv_log_: duplicate tuples
I _think you've tripped over the (in)ability of contrib/rserv to keep up
with large numbers of changes to the same tuple inside the snapshot
period. I think there may have been a patch to the rserv.c code
which fixed this at one time, but I don't know. If you run the
snapshot-applier often enough, you probably won't run into this; but
there's no guarantee. It was one of the reasons the contrib/ code
wasn't enough for us back when we started up with .info, and why we
collaborated with PostgreSQL, Inc. to improve the code.
This is fixed in the PostgreSQL, Inc. version, but that doesn't
help you if you want free software right now.
I gather that dbmirror might be a little better at this, but I don't
know. Others have said that they've had good luck with it (I have
something that works for me now, so I'm not about to change it!).
One thing I do notice about dbmirror is that it requires a
single-column primary key on every replicated table. I bet you could
hack it to use some other not null unique column, though.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110