| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Moving relation extension locks out of heavyweight lock manager |
| Date: | 2017-11-09 15:38:41 |
| Message-ID: | 9722.1510241921@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> No, that's not right. Now that you mention it, I realize that tuple
> locks can definitely cause deadlocks. Example:
Yeah. Foreign-key-related tuple locks are another rich source of
examples.
> ... So I don't
> think we can remove speculative insertion locks from the deadlock
> detector either.
That scares me too. I think that relation extension can safely
be transferred to some lower-level mechanism, because what has to
be done while holding the lock is circumscribed and below the level
of database operations (which might need other locks). These other
ideas seem a lot riskier.
(But see recent conversation where I discouraged Alvaro from holding
extension locks across BRIN summarization activity. We'll need to look
and make sure that nobody else has had creative ideas like that.)
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2017-11-09 15:40:31 | Re: Pg V10: Patch for bug in bonjour support |
| Previous Message | Robert Haas | 2017-11-09 15:31:57 | Re: Runtime Partition Pruning |