Subject | Re: Database replication - problem with uncommited transactions. |
---|---|
Author | franbenz |
Post date | 2010-03-23T12:43:57Z |
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@...> wrote:
.
.
.
I know transaction 4 can see pkey=5 and pkey=6, but it shouldn't copy those records until previous records (in this example pkey=3) are commited.
The replication process is started periodically. So hopefully, next time it starts, transaction #3 will already be commited and records 4,5,6 will be copied.
>.
.
.
> > pkey | query.
> > -----------------
> > 1 | insert ... COMMITED RECORD( by transaction #1 )
> > 2 | update ... COMMITED RECORD( by transaction #1 )
> > 3 | insert ... COMMITED RECORD( by transaction #2 )
> > 4 | insert ... RECORD INSERTED BY TRANSACTION #3 CURRENTLY
> > UNCOMMITED (invisible to my current transaction)
> > 5 | update ... COMMITED RECORD( by transaction #2 )
> > 6 | update ... COMMITED RECORD( by transaction #2 )
> >
> >
> >
> > If I connect to the database with transaction #4 I need to know which
> > one is the last record, previous to any unncommited transaction. My
> > expected answer is pkey = 3.
> >
.
>I need transaction 4 to know that pkey=3 is the last record that can be cronologically copied to my destination database.
> that actions in your audit table will only be committed when the user
> commits the source table records. So your transaction 4 will always only see
> the committed records.
> Alan
I know transaction 4 can see pkey=5 and pkey=6, but it shouldn't copy those records until previous records (in this example pkey=3) are commited.
The replication process is started periodically. So hopefully, next time it starts, transaction #3 will already be commited and records 4,5,6 will be copied.