Re: [Firebird-devel] Read consistency patch

2018-07-25 Thread liviuslivius
>>In this case exactly. You wrote about read >>committed transactions so I >>made such notation) ok, yes i have wroted i simplified example about read commited but here snapsot is vital >>One more note about your idea. Engine >>will have to read every record >>in anycase. But maybe expression

Re: [Firebird-devel] Read consistency patch

2018-07-25 Thread Roman Simakov
ср, 25 июл. 2018 г. в 13:08, liviuslivius : > > > > Note: this SELECT may have greater CN then you have stored and it > > means on the next step you may receive records already selected here. > > You merge algorithm should take it into account. > > > > Roman Simakov > > > If transaction is in

Re: [Firebird-devel] Read consistency patch

2018-07-25 Thread liviuslivius
> Note: this SELECT may have greater CN then you have stored and it > means on the next step you may receive records already selected here. > You merge algorithm should take it into account. > > Roman Simakov If transaction is in snapshot isolation mode then problem should not exists Firebird

Re: [Firebird-devel] Read consistency patch

2018-07-25 Thread Roman Simakov
ср, 25 июл. 2018 г. в 10:38, liviuslivius : > but from below scenario you can bring the idea > > usage case: > 1. > TR1 insert and update data on TableX and is still active > > 2. > Application do > TR2 start and we get recentCN and remember it as interestingCN > and we do > SELECT *

Re: [Firebird-devel] Read consistency patch

2018-07-25 Thread liviuslivius
>I don't know if IB's "Change View" really useful feature. Do you have some > expirience\opinon? > > Regards, > Vlad Sadly, no. We have had too many problems with Interbase stability and the worst ever seen paid support (Fortunately, Delphi support works well), that we have not tried to

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread Vlad Khorsun
24.07.2018 11:13, liviuslivius wrote: Hi, question about this patch https://github.com/FirebirdSQL/firebird/pull/105 Is this possible that this CN(commit number) of transactions (pair transaction id + CN) can be stored into some table? Currently - no. Probably we could find a way for it.

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread Roman Simakov
вт, 24 июл. 2018 г. в 17:06, liviuslivius : > Is this possible that this CN(commit number) of transactions (pair > transaction id + CN) can be stored into some table? CN is not stored at all. A list of CommitNumbers is generated looking into TIP on database init in memory. Then it's mainainted

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread liviuslivius
Ok, the name is not so important but call it recentCN but extended sample -- Is this possible that this CN(commit number) of transactions (pair transaction id + CN) can be stored into some table? Is it possible to retrive most recent CN from transaction start point

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread Dimitry Sibiryakov
24.07.2018 13:43, Mark Rotteveel wrote: The term SCN is already used by nbackup, lets not muddle the waters by overloading it for another usecase. Taking into account usage of "SCN" term in Oracle, it is better to invent a new one for nbackup than for transaction-related counter. --

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread liviuslivius
> > you do > > SELECT * from tableX where RDB$RECORD_VERSION>2 > > > > above select will not see data commited by transaction id=1 because > > it modify records before tr2 start > > and tr1 is commited after tr2 start > > :) tr1 committed BEFORE select in tr2 and in read committed mode MUST >

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread Mark Rotteveel
On 2018-07-24 10:13, liviuslivius wrote: Hi, question about this patch https://github.com/FirebirdSQL/firebird/pull/105 Is this possible that this CN(commit number) of transactions (pair transaction id + CN) can be stored into some table? Is it possible to retrive most recent CN from

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread Roman Simakov
вт, 24 июл. 2018 г. в 13:15, liviuslivius : > > Hi, > > this is not the same > consider: > > transaction id=1 exists and is not commited but have modified some records in > tableX. > you start new transaction id=2 (read commited isolation mode) > you commit transaction id=1 > > > you do > SELECT

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread liviuslivius
Hi, this is not the same consider: transaction id=1 exists and is not commited but have modified some records in tableX. you start new transaction id=2 (read commited isolation mode) you commit transaction id=1 you do SELECT * from tableX where RDB$RECORD_VERSION>2 above select will not see

Re: [Firebird-devel] Read consistency patch

2018-07-24 Thread Dimitry Sibiryakov
24.07.2018 10:13, liviuslivius wrote: It can provide simple way to retrive new records/changes in tables (new feature). E.g. whe can then do SELECT * FROM TABLEX WHERE CN>:SCN; You already can do it with RDB$RECORD_VERSION. -- WBR, SD.

[Firebird-devel] Read consistency patch

2018-07-24 Thread liviuslivius
Hi,   question about this patch https://github.com/FirebirdSQL/firebird/pull/105   Is this possible that this CN(commit number) of transactions (pair transaction id + CN) can be stored into some table? Is it possible to retrive most recent CN from transaction start point (call this SCN). It can