Обсуждение: LLL: serialized and schema objects...

Поиск
Список
Период
Сортировка

LLL: serialized and schema objects...

От
Vadim Mikheev
Дата:
I need in help:

let's say you have serialized transaction in one session...
Now, some other user drops a table that was in data base when
serialized transaction began but does it before this transaction
read table (first time)...

1. Will RDBMS allow to drop table? (And so abort
   serialized transaction if it tries read dropped
   table)
2. Or DROP TABLE will be blocked waiting when
   serialized transaction commits/aborts ?

Could someone test this in Oracle/Informix/Sybase ?

Vadim

Re: [HACKERS] LLL: serialized and schema objects...

От
David Maclean
Дата:
Vadim Mikheev wrote:
>
> I need in help:
>
> let's say you have serialized transaction in one session...
> Now, some other user drops a table that was in data base when
> serialized transaction began but does it before this transaction
> read table (first time)...
>
> 1. Will RDBMS allow to drop table? (And so abort
>    serialized transaction if it tries read dropped
>    table)
> 2. Or DROP TABLE will be blocked waiting when
>    serialized transaction commits/aborts ?
>
> Could someone test this in Oracle/Informix/Sybase ?
>
> Vadim

Oracle 8 will drop the table without waiting. The serializable session
will not see the table either before or after reading the table, i.e.
point 1.

David

Re: [HACKERS] LLL: serialized and schema objects...

От
Vadim Mikheev
Дата:
David Maclean wrote:
> >
> > let's say you have serialized transaction in one session...
> > Now, some other user drops a table that was in data base when
> > serialized transaction began but does it before this transaction
> > read table (first time)...
> >
> > 1. Will RDBMS allow to drop table? (And so abort
> >    serialized transaction if it tries read dropped
> >    table)
> > 2. Or DROP TABLE will be blocked waiting when
> >    serialized transaction commits/aborts ?
> >
> > Could someone test this in Oracle/Informix/Sybase ?
> >
> > Vadim
>
> Oracle 8 will drop the table without waiting. The serializable session
> will not see the table either before or after reading the table, i.e.
> point 1.

Thanks, David!
Just for clarification: Oracle allows to drop table even if
table was already read by some currently active transaction ?!!!
Hmm, this means that schema objects are not subject
of transaction isolation..

Could someone comments what standards say???

And one more question: will serialized transaction see
just dropped table when queriyng system catalog ???
Should we return a row for just dropped table A when
run query below in serialized transaction:

select * from pg_class where relname = 'A';

???
Are system tables subject of multi-versioning ???

Vadim