From: | Greg Sabino Mullane <htamfids(at)gmail(dot)com> |
---|---|
To: | veem v <veema0000(at)gmail(dot)com> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Christophe Pettus <xof(at)thebuild(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: IO related waits |
Date: | 2024-09-19 12:24:19 |
Message-ID: | CAKAnmmJhsNL=f+z7R018L6NrLQuq_7+quqZkGUKbzHRctHaY3w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Sep 19, 2024 at 5:17 AM veem v <veema0000(at)gmail(dot)com> wrote:
> 2024-09-18 17:05:56 UTC:100.72.10.66(54582):USER1(at)TRANDB:[14537]:DETAIL:
> Process 14537 waits for ShareLock on transaction 220975629; blocked by
> process 14548.
>
You need to find out exactly what commands, and in what order, all these
processes are doing. Deadlocks can be avoided by rearranging your
application logic.
> 2024-09-18 17:05:56 UTC:100.72.22.33(54582):USER1(at)TRANDB:[14537]:ERROR:
> current transaction is aborted, commands ignored until end of transaction
> block
> 2024-09-18 17:05:56 UTC:100.72.22.33(54582):USER1(at)TRANDB:[14537]:STATEMENT:
> INSERT INTO TRANDB.EXCEP_TAB (...)
> 2024-09-18 17:05:56 UTC:100.72.22.33(54582):USER1(at)TRANDB:[14537]:ERROR:
> current transaction is aborted, commands ignored until end of transaction
> block
> 2024-09-18 17:05:56 UTC:100.72.22.33(54582):USER1(at)TRANDB:[14537]:STATEMENT:
>
> 2024-09-18 17:05:56 UTC:100.72.22.33(36096):USER1(at)TRANDB:[14551]:ERROR:
> current transaction is aborted, commands ignored until end of transaction
> block
>
Fix your application. It should be checking that each command completed and
not just blindly pushing on to the next statement while ignoring the error.
This is really difficult to diagnose from afar with only snippets of logs
and half-complete descriptions of your business logic. Pull everyone
involved into a room with a whiteboard, and produce a document describing
exactly what your application does, and how it is doing it. Switch from
reactive to proactive.
Cheers,
Greg
From | Date | Subject | |
---|---|---|---|
Next Message | veem v | 2024-09-19 13:03:04 | Re: IO related waits |
Previous Message | Ron Johnson | 2024-09-19 12:07:54 | Re: How batch processing works |