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

From Vadim Mikheev
Subject Re: AW: relation ### modified while in use
Date
Msg-id 006201c03ce2$2652a600$bc7a30d0@sectorbase.com
Whole thread Raw
In response to AW: AW: relation ### modified while in use  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
List pgsql-hackers
> > As for locks,weak locks doesn't pass intensive locks.  Dba
> > seems to be able to alter a table at any time.
>
> Sorry, I don't understand this sentence. Tom suggested placing a shared
lock on
> any table that is accessed until end of tx. Noone can alter table until
all users have
> closed their txns and not accessed tables again.

More of that - while one xaction will wait to alter a table no new xaction
will be
allowed to access this table too.

> Remember that this would include creating an index ...

I don't think so. Index creation requires
1. share lock on schema
2. share lock on data

Vadim




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: AW: AW: relation ### modified while in use
Next
From: Bruce Momjian
Date:
Subject: Re: [COMMITTERS] pgsql/src/test/regress/expected (plpgsql.out inet.out foreign_key.out errors.out)