From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | postgann2020 s <postgann2020(at)gmail(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: proc state as "Idle_in_transaction" in pg_stat_activity |
Date: | 2020-04-13 17:24:31 |
Message-ID: | CAMkU=1xgKwHYfE9ON-evQtivsT=4GeQwFyqOeBT66h4K5NV3gA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Sun, Apr 12, 2020 at 8:37 AM postgann2020 s <postgann2020(at)gmail(dot)com>
wrote:
> Hi All,
>
> Good Evening.
>
> Could someone please suggest the process to resolve the issue.
>
> Issue : proc state as "Idle_in_transaction"
>
> Env: Postgres 9.5.15
> Job Schedulers : Tomcat ( For running procs).
>
> We are using tomcat as scheduler for running few jobs.we are observing one
> of the proc state as "Idle_in_transaction" and due to this remaining other
> dependent procs get stucked and causing waiting for ever.
>
> If we ran same proc from psql and pgadmin we could able to run
> successfully and able to get response and no "Idle_in_transaction" state.
>
> proc: select msg,rescode from schema.proc_name('arg1','arg2');
>
If you run just this in psql, you will be in autocommit mode. The
statement will run in its own transaction which commit as soon as the
statement finishes.
The problem is not with the line you show, it is in what happens before (a
transaction is opened) and after (it is not committed) that line.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | postadmin2020 S | 2020-04-14 07:06:07 | Re: proc state as "Idle_in_transaction" in pg_stat_activity |
Previous Message | Tom Lane | 2020-04-13 15:33:10 | Re: Help needed on optimizing query |