AW: relation ### modified while in use - Mailing list pgsql-hackers

From Zeugswetter Andreas SB
Subject AW: relation ### modified while in use
Date
Msg-id 11C1E6749A55D411A9670001FA6879633680C0@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
List pgsql-hackers
> 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


pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: to_char() dumps core
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: embedded sql with indicators in other DBs