Re: Session Identifiers

Поиск
Список
Период
Сортировка
Искать
От
Melvin Davidson
Тема
Re: Session Identifiers
Дата
Msg-id
CANu8FixCrFKSWPJOoSVqpM+sj=SYObZeuAJh=kf7C1UD7LBPgA@mail.gmail.com
Ответ на
Re: Session Identifiers (Stephen Frost)
Список
Дерево обсуждения
Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Andy Colson <andy@squeakycode.net>
Re: Session Identifiers Pavel Stehule <pavel.stehule@gmail.com>
Re: Session Identifiers Dmitry Igrishin <dmitigr@gmail.com>
Re: Session Identifiers Pavel Stehule <pavel.stehule@gmail.com>
Re: Session Identifiers Dmitry Igrishin <dmitigr@gmail.com>
Re: Session Identifiers Pavel Stehule <pavel.stehule@gmail.com>
Re: Session Identifiers Dmitry Igrishin <dmitigr@gmail.com>
Re: Session Identifiers Pavel Stehule <pavel.stehule@gmail.com>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Pavel Stehule <pavel.stehule@gmail.com>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Tom Lane <tgl@sss.pgh.pa.us>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Pavel Stehule <pavel.stehule@gmail.com>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Pavel Stehule <pavel.stehule@gmail.com>
Re: Session Identifiers Melvin Davidson <melvin6925@gmail.com>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Stephen Frost <sfrost@snowman.net>
Re: Session Identifiers Michael Paquier <michael.paquier@gmail.com>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Melvin Davidson <melvin6925@gmail.com>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Melvin Davidson <melvin6925@gmail.com>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Andrew Sullivan <ajs@crankycanuck.ca>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Re: Session Identifiers Melvin Davidson <melvin6925@gmail.com>
Re: Session Identifiers oleg yusim <olegyusim@gmail.com>
Pursuant to Stehen's suggestion, I've attached a scripts that you can execeute from a cron. I wrote it when I was working for a previous company that used to have users that opened connections
and transaction that did nothing for a long time.
Just adjust the max_time for your liking. You can also add OR current_query = '<IDLE>' to kill stagnant connections.

On Mon, Dec 21, 2015 at 11:42 AM, Stephen Frost <sfrost@snowman.net> wrote:
Oleg,

* oleg yusim (olegyusim@gmail.com) wrote:
> tcp_keepalives_idle = 900
> tcp_keepalives_interval=0
> tcp_keepalives_count=0
>
> Doesn't terminate connection to database in 15 minutes of inactivity of
> psql prompt. So, it looks like that would work only for case if network
> connection is broken and session left hanging. For psql prompt case looks
> like pg_terminate_backend() would be the only solution.

Those settings aren't for controlling idle timeout of a connection.

pg_terminate_backend() will work and could be run out of a cronjob.

Thanks!

Stephen



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.
В списке pgsql-general по дате отправления
От: Stephen Frost
Дата:
Сообщение: Re: Session Identifiers
От: oleg yusim
Дата:
Сообщение: Re: Session Identifiers
FAQ