Search Postgresql Archives

Re: update functions locking tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 29, 2005 at 09:41:21PM -0300, Clodoaldo Pinto wrote:
>
> 26873 ? S 0:18 postgres: user database 127.0.0.1(38946) SELECT waiting
> 23973 ? S 0:22 postgres: user database 127.0.0.1(43396) SELECT waiting
> 31212 ? S 0:02 postgres: user database 127.0.0.1(60619) SELECT waiting
> 21601 ? S 0:00 postgres: user database 127.0.0.1(46770) SELECT waiting
> 
> I've been trying for 3 days to figure out what is happening to no
> avail. What am i missing about transactions and MVCC? What could make
> a plpgsql update function lock a table? The indexes are default btree.

In general, writers shouldn't block readers.  Have you examined
pg_locks?  Do you know exactly what the blocked queries are, or can
you find out from pg_stat_activity (stats_command_string must be
enabled)?  Are you doing any explicit locking (LOCK statement)?

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux