Understanding updates and deadlocks more clearly

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Understanding updates and deadlocks more clearly
Date: 2022-09-02 21:15:16
Message-ID: CAOC+FBW_UYx39cXjXE2Y68pU4O8-+PUUabvZzba4Y38Hm+McDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hey folks: I want to clarify a few things about locks on updates:

1- can two processes update the same table if they are updating different
rows?

2- in the event of two processes trying to update the same row, does this
always result in a deadlock?

3- is there a way to create a system whereby potentially concurrent
processes can update the same row in a given table, can the server be made
to queue those updates, etc?

Is it just a no-go to try and have a situation where concurrent processes
are trying to update the same record?

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2022-09-02 21:55:57 Re: Understanding updates and deadlocks more clearly
Previous Message Sbob 2022-09-02 16:42:28 Re: pgbench log output