| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Mott Leroy <mott(at)acadaca(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: help with locked table(s)/transactions(s) |
| Date: | 2006-02-01 14:24:11 |
| Message-ID: | 29624.1138803851@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Mott Leroy <mott(at)acadaca(dot)com> writes:
> I'm still confused by the behavior however. The locking behaves as if
> its some kind of *table* level lock, because while the function is
> executing (a long time), a dozen updates and inserts build up waiting
> for some lock to be released. If the loop just occassionally puts a lock
> on a few different rows, I don't see how that could cause the
> experienced behavior -- presumably the lock on those particular rows is
> released after its iteration through the loop. Unless, of course, the
> lock isn't given up ...
No, the locks would be held till end of transaction. It is a little odd
that you have so many conflicts, though, unless the referenced table is
pretty small and/or this loop manages to touch a large fraction of the
possible keys.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noble, Robert | 2006-02-01 14:46:37 | eqpg doesn't like bit fields |
| Previous Message | Adam Witney | 2006-02-01 14:19:56 | Passwords when changing users -> roles |