| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgreSQL(dot)org |
| Subject: | Re: Another bug introduced by fastpath patch |
| Date: | 2013-11-28 01:21:41 |
| Message-ID: | 13105.1385601701@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> We could still do this if we were willing to actually reject requests
> for session level locks on fast-path-eligible lock types. At the moment
> that costs us nothing really. If anyone ever did have a use case, we
> could consider adding the extra logic to support it.
Nope, that *still* doesn't work, because in non-allLocks mode the main
loop won't clear any locks that have been promoted from fastpath to
regular. Sigh. For the moment I'm proposing that we just re-fetch
the list header after acquiring the lock. The attached patch is slightly
more verbose than that, because I took the opportunity to reformulate the
while() loop as a for() loop and thereby eliminate some goto's.
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| safer-iteration-in-LockReleaseAll.patch | text/x-diff | 6.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2013-11-28 02:22:50 | Re: [GENERAL] pg_upgrade ?deficiency |
| Previous Message | Peter Geoghegan | 2013-11-28 01:17:09 | Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE |