Обсуждение: AW: relation ### modified while in use

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

AW: relation ### modified while in use

От
Zeugswetter Andreas SB
Дата:
> What I'm proposing is that once an xact has touched a
> table, other xacts should not be able to apply schema updates to that
> table until the first xact commits.

No, this would mean too many locks, and would leave the dba with hardly a 
chance to alter a table. 

If I recall correctly the ANSI standard mandates that schema modifications 
be seen immediately. Thus imho we need to refresh the relcache on first 
access after modification. Thus two accesses to one table inside one tx 
would be allowed to see two different versions (the exception beeing 
serializable isolation level).

Imho we only need to lock out an alter table if a cursor is open on that table.

Andreas


Re: AW: relation ### modified while in use

От
Hiroshi Inoue
Дата:

Zeugswetter Andreas SB wrote:

> > What I'm proposing is that once an xact has touched a
> > table, other xacts should not be able to apply schema updates to that
> > table until the first xact commits.
>
> No, this would mean too many locks, and would leave the dba with hardly a
> chance to alter a table.
>

Are there many applications which have many SELECT statements(without
FOR UPDATE) in one tx ?
As for locks,weak locks doesn't pass intensive locks.  Dba seems to be able
to alter a table at any time.

Regards.
Hiroshi Inoue