When we're developing database apps, we try to apply rules that say to never 
hold any sort of explicit lock, apart from within a transaction, and never 
spanning application execution or worse, user interaction. And we avoid ever 
having any sort of network latency tied into that transaction as well. 

Regards,
 
Greg
 
Dr Greg Low
 
1300SQLSQL (1300 775 775) office | +61 419201410 mobile
SQL Down Under | Web: https://sqldownunder.com | About Greg:  
https://greglow.com 

-----Original Message-----
From: Laurenz Albe <[email protected]> 
Sent: Tuesday, 1 December 2026 7:16 PM
To: Greg Low <[email protected]>; Justin <[email protected]>
Cc: Muhammad Rehan Paracha <[email protected]>; 
[email protected]
Subject: Re: Best practices for transaction-level authorization, row locking 
and least-privilege roles in PostgreSQL 17

On Tue, 2026-12-01 at 02:51 +0000, Greg Low wrote:
> Surely the biggest issue there is the way that application work is 
> being done while holding any sort of lock. The transactions need to be 
> short and not waiting for any app work, particularly if it's heavy or 
> involved round trip latency.

I agree.
However, the world is not perfect, and sometimes a calculation takes longer 
than you would like.  Also, what is long is relative: with a lot of contention, 
even a short transaction can run into a lot of conflicts.

Yours,
Laurenz Albe



Reply via email to