RE: About row locking ordering

2022-12-07 Thread Ryo Yamaji (Fujitsu)
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

Re: About row locking ordering

2022-11-25 Thread Kirk Wolak
My first question is why are you not using "WHERE CURRENT OF" cursor_name? The link to the page follows. 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... https://www.postgresql.org/docs/curre

About row locking ordering

2022-11-24 Thread Ryo Yamaji (Fujitsu)
Hi All. When multiple sessions tried to acquire a row lock on the same tuple sequentially, I expected that the first session waiting for the lock would acquire the lock first (FIFO). However, when we actually tested it, there were cases where a session that was behind a first session acquired a