public inbox for [email protected]help / color / mirror / Atom feed
can a blocked transaction affect the performance of one that is blocking it? 3+ messages / 3 participants [nested] [flat]
* can a blocked transaction affect the performance of one that is blocking it? @ 2024-12-09 18:42 Eric Schwarzenbach <[email protected]> 2024-12-09 23:10 ` Re: can a blocked transaction affect the performance of one that is blocking it? Nikolay Samokhvalov <[email protected]> 2024-12-10 09:22 ` Re: can a blocked transaction affect the performance of one that is blocking it? David Mullineux <[email protected]> 0 siblings, 2 replies; 3+ messages in thread From: Eric Schwarzenbach @ 2024-12-09 18:42 UTC (permalink / raw) To: [email protected] <[email protected]> Hi, Could one transaction (one that should be relatively simple and short) cause another complex, long running transaction (involving INSERTS, on a table the first transaction may be reading from) to take many orders of magnitude longer than it would normally? (short of competing for system resources, like CPU time etc, of course) I don't believe my scenario involved a deadlock but I expect my short transaction was probably blocked by my long one. Does it make any sense that this could very significantly affect the performance of the non-blocked transaction? Thanks, Eric ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: can a blocked transaction affect the performance of one that is blocking it? 2024-12-09 18:42 can a blocked transaction affect the performance of one that is blocking it? Eric Schwarzenbach <[email protected]> @ 2024-12-09 23:10 ` Nikolay Samokhvalov <[email protected]> 1 sibling, 0 replies; 3+ messages in thread From: Nikolay Samokhvalov @ 2024-12-09 23:10 UTC (permalink / raw) To: Eric Schwarzenbach <[email protected]>; +Cc: [email protected] <[email protected]> On Mon, Dec 9, 2024 at 13:16 Eric Schwarzenbach <[email protected]> wrote: > Hi, > > Could one transaction (one that should be relatively simple and short) > cause another complex, long running transaction (involving INSERTS, on a > table the first transaction may be reading from) to take many orders of > magnitude longer than it would normally? (short of competing for system > resources, like CPU time etc, of course) > > I don't believe my scenario involved a deadlock but I expect my short > transaction was probably blocked by my long one. Does it make any sense > that this could very significantly affect the performance of the > non-blocked transaction? > > Thanks, > > Eric Have you tried wait event analysis (looking at wait_event_type, wait_event, state, query samples from pg_stat_activity)? > ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: can a blocked transaction affect the performance of one that is blocking it? 2024-12-09 18:42 can a blocked transaction affect the performance of one that is blocking it? Eric Schwarzenbach <[email protected]> @ 2024-12-10 09:22 ` David Mullineux <[email protected]> 1 sibling, 0 replies; 3+ messages in thread From: David Mullineux @ 2024-12-10 09:22 UTC (permalink / raw) To: Eric Schwarzenbach <[email protected]>; +Cc: [email protected] Yes. Also, are you sure you mean deadlock ? It sounded like this is just a simple lock conflict and not a deadlock. The first transaction could be blocked on something else (even tho it's not ally short and quick ). Lock requests are in a queue On Mon, 9 Dec 2024, 21:16 Eric Schwarzenbach, <[email protected]> wrote: > Hi, > > Could one transaction (one that should be relatively simple and short) > cause another complex, long running transaction (involving INSERTS, on a > table the first transaction may be reading from) to take many orders of > magnitude longer than it would normally? (short of competing for system > resources, like CPU time etc, of course) > > I don't believe my scenario involved a deadlock but I expect my short > transaction was probably blocked by my long one. Does it make any sense > that this could very significantly affect the performance of the > non-blocked transaction? > > Thanks, > > Eric > > > > > ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-12-10 09:22 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-12-09 18:42 can a blocked transaction affect the performance of one that is blocking it? Eric Schwarzenbach <[email protected]> 2024-12-09 23:10 ` Nikolay Samokhvalov <[email protected]> 2024-12-10 09:22 ` David Mullineux <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox