Reputation
Next tag badge:
93/100 score
20/20 answers
Badges
4 46 94
Impact
~1.7m people reached

27m
comment Simultaneous calls to the same function: how are deadlocks occurring?
Quite right, my bad. I think I was getting confused with another thing we tried (which didn't prevent the deadlock).
1h
comment Simultaneous calls to the same function: how are deadlocks occurring?
Actually it turns out you were right about lock escalation - though the mechanism is subtle.
1h
awarded  Nice Question
2h
comment Simultaneous calls to the same function: how are deadlocks occurring?
@Erwin you'll doubtless be interested in the answer I got from posting at pgsql-bugs :)
2h
answered Simultaneous calls to the same function: how are deadlocks occurring?
2h
revised Simultaneous calls to the same function: how are deadlocks occurring?
added 343 characters in body
3h
comment Simultaneous calls to the same function: how are deadlocks occurring?
Thanks, and I agree with what you say, but this doesn't appear to be the cause in this case. That's clearer in the more minimal test case I've added to the question (which you could try yourself).
4h
revised Simultaneous calls to the same function: how are deadlocks occurring?
added reproducible test case
5h
comment Simultaneous calls to the same function: how are deadlocks occurring?
@Daniel Do you mean in the same session? The select statement that calls new_customer isn't wrapped in a transaction block.
5h
comment Simultaneous calls to the same function: how are deadlocks occurring?
@Erwin thanks, yes I'm looking forward to upsert! I've worked around this problem for now with the traditional retry loop which I was in too much of a hurry to implement first time round.
11h
revised Simultaneous calls to the same function: how are deadlocks occurring?
edited title
12h
asked Simultaneous calls to the same function: how are deadlocks occurring?
23h
awarded  Caucus
Jul
23
awarded  Good Answer
Jul
22
revised Oracle instant client
fixed markdown typos in quote and added emphasis
Jul
22
comment Oracle instant client
It's best to add follow-up questions separately - you can link between related questions if necessary.
Jul
22
answered Oracle instant client
Jul
21
revised When should I rebuild indexes?
edited tags
Jul
21
revised Is a weekly rebuild of indexes a good idea?
link from comments before deleting them
Jul
20
revised Cannot build correct SELECT in MySql
appended answer 107519 as supplemental