Search Postgresql Archives

RE: About row locking ordering

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

 



Thank you for your comments. Sorry for the late reply.

From: Kirk Wolak  Sent: Friday, November 25, 2022 6:12 PM
> My first question is why are you not using "WHERE CURRENT OF" cursor_name?

I thought that cursors are preferred for manipulating large numbers of rows. 
So I did not consider using cursors in this test case because each process manipulates only one row.

However, assuming general usage, I thought it would be preferable to use a cursor, as you pointed out, because it might result in fewer table accesses.
I didn't have that knowledge.


> But effectively, you are locking the row and that is the row you want to update (the current row of the cursor).
> I wonder if that addresses the problem...

I tested it with a cursor, but there was still a problem..
I will attach the script used for the test, though it will be simple.

<<attachment: testset2.zip>>


[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux