I have two aws task where one could be writing to table another could run delete query at the same time both could be running parallel queries but playing with different rows. so the question is if I run delete from table where column_name=some condition ? then will postgres apply table level lock or row level lock. If table level lock gets applied then another task will not able to write into table.
2 Answers
There are many different lock modes. The table will be locked, but in a mode that still allows other INSERT, DELETE, and UPDATE operations to happen concurrently. The rows actually deleted will also be locked, in a more restrictive mode.
1 Comment
Ankur Agarwal
Any documentation for this i.e. Rows being deleted are locked ?