From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> |
Cc: | "'Hiroshi Inoue'" <Inoue(at)tpf(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: AW: AW: AW: relation ### modified while in use |
Date: | 2000-10-23 14:36:31 |
Message-ID: | 8375.972311791@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> writes:
> No, the above is not a valid example, because Session 2 won't
> get the exclusive lock until Session 1 commits, since Session 1 already
> holds a lock on foo (for the inserted row).
> You were talking about the "select only" case (and no for update eighter).
> I think that select statements need a shared lock for the duration of their
> execution only.
You seem to think that locks on individual tuples conflict with
table-wide locks. AFAIK that's not true. The only way to prevent
another xact from gaining AccessExclusiveLock on a table is to be
holding some lock *on the table*.
As for your claim that read-only xacts don't need to worry about
preventing schema updates, what of adding/deleting ON SELECT rules?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2000-10-23 14:42:43 | Re: question about new fmgr in 7.1 snapshots |
Previous Message | Bruce Momjian | 2000-10-23 14:33:44 | Re: pgsql/src/test/regress/expected (plpgsql.out inet.out foreign_key.out errors.out) |