How to perform copy into in multiple clients at the same time?

Yinjie Lin exialin37 at
Thu Dec 27 07:59:05 CET 2018


    I'm new to MonetDB and I think this is a great project!

    I have a problem the same as this one:
, namely copy data into tables from multiple clients at the same time.

    As the stackoverflow question suggests, MonetDB uses Optimistic
Concurrency Control, but the behaviour is different from my
expectation. For example, say I have a table `t` without any
constraints, and I run the following queries:

client1                                      client2
start transaction;
insert into t values (1);
                                           start transaction;
                                           insert into t values (2);

I would expect both commits succeed since the rows to be inserted do
not conflict with each other and do not change original rows in the
table. And this is the behaviour of some databases with OCC, e.g. TiDB
(a MySQL compatible database). But MonetDB would rollback the second
transaction. So my question is: is it possible to change this
behaviour by modifying the code? If so, could you give me some
guidance or suggestion?

Thanks in advance!

Best Regards,
Yinjie Lin

More information about the developers-list mailing list