Handling psql lost connections

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Handling psql lost connections
Дата
Msg-id CAEfWYyz0OYWQmFCYgpf68tWwDrOPXF3g4WD1Q5jR=BM1t-USWw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Handling psql lost connections  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Handling psql lost connections  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
When firewalls/VPNs stand between my psql client and a remote PostgreSQL server the connection will on occasion time out and drop. This results in the following scenario:

-Leave for lunch mid project - leave psql open.

-Return from lunch, complete and submit large query.

-Notice query is taking too long. cancel it.

-Cancel doesn't return - realize that connection has dropped.

-Kill psql - history is not written out. Start query from scratch.

Is there:

1) A way to set psql to send keepalives?

2) A way to gracefully kill psql ensuring that the history is saved?

Yes, I know I and my coworkers could spend brain cycles trying to unerringly remember to close and restart connections, write all queries in an external editor and then submit them, etc. but I'm looking for more user friendly options.

Cheers,
Steve

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

Предыдущее
От: Paul Jungwirth
Дата:
Сообщение: Re: Postgres Permissions Article
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Handling psql lost connections