[erlang-questions] Re: mnesia question: create table in a transaction
Fri Sep 18 17:15:26 CEST 2009
On Fri, 18 Sep 2009, Eugen Sobchenko wrote:
> On Sep 18, 4:26 pm, Ulf Wiger <ulf.wi...@REDACTED> wrote:
> > Schema transactions are more conservative. To the extent
> > that use of these functions is at all recommended, you
> > should not use them within normal transactions.
> Does this mean that create_table2 better than create_table_3 in the
> context of my problem?
> Or have I misunderstood something?
an ordinary invocation of mnesia:create_table/2 already creates a schema
transaction for you; the table either appears everywhere or nowhere.
what ulf was getting at was, if you want the table creation to be atomic
with other normal data operations, this will be very tricky. however it
is unclear from your example if that was the goal, or if you merely didn't
recognize that create_table uses schema_transactions internally.
More information about the erlang-questions