Subject Re: [Firebird-Architect] global temporary table and read only transaction
Author Vlad Khorsun
>>> now, if you are inside a read only transaction, you can't
>>> insert data into a GTT but GTT are useful to some long
>>> running select queries or even to make a set of successive
>>> select queries since GTT have a flag and that data are
>>> outside the db file, wouldn't be possible to allow insert
>>> even on read only transaction ?
>>>
> I registered this in the tracker. I think Vlad agreed with me on this. :-)
>
>>
>> In a read-only transaction? No.
>>
>> In a read-only *database*? Possibly.
>>
>>
>> I do not see it as correct that a read-only transaction could do
>> anything which involves write operations.
> I think it should be writable even in read-only transaction. GTT may be
> used to do calculations, and they doesn't interfere with the read-only
> data, so I see no problem.

Yes, i agree here. More, currently for read-only database engine marked
every transaction as read-only. So i see no difference between read-only
transaction on read-only database and read-only transaction on read-write
database :)

For GTT with transaction scope (ON COMMIT DELETE ROWS) i see no
problem to allow modifications in read-only transactions. But i see a problem
with attachment scope GTT's as we need in this case to not treat read-only
transactions as pre-committed to preserve isolation between them.


Regards,
Vlad