Re: IO related waits - Mailing list pgsql-general

From Tom Lane
Subject Re: IO related waits
Date
Msg-id 2587192.1726865228@sss.pgh.pa.us
Whole thread Raw
In response to Re: IO related waits  (veem v <veema0000@gmail.com>)
Responses Re: IO related waits
List pgsql-general
veem v <veema0000@gmail.com> writes:
> Able to reproduce this deadlock graph as below.  Now my question is , this
> is a legitimate scenario in which the same ID can get inserted from
> multiple sessions and in such cases it's expected to skip that (thus "On
> conflict Do nothing" is used) row. But as we see it's breaking the code
> with deadlock error during race conditions where a lot of parallel threads
> are operating. So how should we handle this scenario?

Do you have to batch multiple insertions into a single transaction?
If so, can you arrange to order them consistently across transactions
(eg, sort by primary key before inserting)?

            regards, tom lane



pgsql-general by date:

Previous
From: veem v
Date:
Subject: Re: IO related waits
Next
From: Ron Johnson
Date:
Subject: Re: IO related waits