From: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> |
---|---|
To: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | AW: AW: Issue NOTICE for attempt to raise lock level? |
Date: | 2000-11-07 17:29:05 |
Message-ID: | 11C1E6749A55D411A9670001FA6879633680F3@sdexcsrv1.f000.d0188.sd.spardat.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> >> I am working on eliminating the "relation NNN modified while in use"
> >> misfeature by instead grabbing a lock on each relation at first use
> >> in a statement, and holding that lock till end of transaction.
>
> > As anticipated, I object :-)
>
> Your objection is founded on two misunderstandings. In the first place,
> we are *always* inside a transaction when executing a query. It may be
> an implicit one-statement transaction, but it's still a transaction.
Ok, but I thought there was some optimization for readonly statements.
> In the second place, we already grab locks that we do not release till
> end of xact for all user-level queries. The problem is that we grab
> them too late, ie, in the executor. I'm just planning to move up the
> grab till first use.
For a "select colname from tablename" we do not currently hold any lock
until end of tx. This is the situation you described, and I am worried about.
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2000-11-07 17:41:02 | Re: AW: AW: Issue NOTICE for attempt to raise lock level? |
Previous Message | Thomas Lockhart | 2000-11-07 17:15:59 | Type resolution for operators |