Search Postgresql Archives

Re: table locking and SELECT FOR UPDATE

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

 



Joseph Shraibman <jks@xxxxxxxxxxxxxxx> writes:
> How come when a share lock is held and update can't be done on the 
> table, but a SELECT FOR UPDATE can be done?  I can't SELECT FOR UPDATE 
> the same row in two transactions, but I can SELECT FOR UPDATE a row that 
> I will won't be able to update because the other table is held in a 
> SHARE lock.

[ shrug... ]  Prohibiting that buys nothing that I can see, and up until
8.1 would have actively broken useful functionality (since SELECT FOR
UPDATE was the only way to lock individual rows, whether or not you had
any intention of updating them).

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[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