Re: Very long " in transaction" query

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Very long " in transaction" query
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C207D5026B@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Very long " in transaction" query  ("Gnanakumar" <gnanam@zoniac.com>)
Ответы Re: Very long " in transaction" query  ("Gnanakumar" <gnanam@zoniac.com>)
Список pgsql-admin
Gnanakumar wrote:
>> SELECT application_name, client_addr, client_hostname, client_port
>> FROM pg_stat_activity
>> WHERE procpid = 14740;

>> (Replace 14740 of the process ID of the "idle in transaction"
backend).

>> Look on the client machine and find the process that holds TCP port
>> "client_port" open (on Linux you can use "lsof" for that).

> Ours is a web-based application and all calls are made "only" from
where the
> web server is running.  No external calls are allowed in my case.
Hence,
> the "only" client machine in my case is the web server.

Then you need to identify the web server process/thread that has
client_port open and fix the problem there.  If you get that process
to close the transaction or terminate, your problem is solved.
You can also terminate a database session from the server with
the pg_terminate_backend function.

The interesting thing to know would be where in your web application
a transaction got left open, so that it does not happen again.

Yours,
Laurenz Albe

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Gnanakumar"
Дата:
Сообщение: Re: Very long " in transaction" query
Следующее
От: "Gnanakumar"
Дата:
Сообщение: Re: Very long " in transaction" query