469,086 Members | 1,280 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,086 developers. It's quick & easy.

After period of time records are not being picked from postgres table

This query expected to update 1 row at a time and after processing we move the same row to next queue and query picks and update next row in infinite loop.

Update queue_table set lock_flag = 150 Where row (entity, sub_entity, side) = (select entity, sub_entity, side from queue_table where lock_flag = 0 and entity = 'Abc' limit 1 for update skip locked ) and entity = 'Abc' and lock_flag = 0;

This happens perfectly for some time and issues happens after couple of hours, not sure whether due to row lock, caching, connection leakage etc.
Jul 1 '21 #1
0 1277

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Bill | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.