Re: [Bug / Question ] " authentication_timeout " is invalid.

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: [Bug / Question ] " authentication_timeout " is invalid.
Дата
Msg-id CAMkU=1yNZMPu+aqRSiMpaZqUxgo8NWkjyo6u9kX2pDkYEPpewA@mail.gmail.com
обсуждение исходный текст
Ответ на [Bug / Question ] " authentication_timeout " is invalid.  (林俊彥 <james.lin@cenoq.com>)
Ответы Re: [Bug / Question ] " authentication_timeout " is invalid.  (林俊彥 <james.lin@cenoq.com>)
Список pgsql-bugs
On Wed, Sep 16, 2015 at 9:02 PM, =E6=9E=97=E4=BF=8A=E5=BD=A5 <james.lin@cen=
oq.com> wrote:

> Hi , Jeff,
>       Thank you for reply.  I used to use in the following ways but still
> could not be verified:
> -----------  Log start ---------------------
> [BEGIN] 2015/9/17 11:51:51
> [postgres@pg95 ~]$ cat test.sh
>
> #!/bin/bash
> ip a |grep eth0
> psql -h 100.200.100.211<<EOF
> show authentication_timeout;
> select now();
> \! sh net_test.sh
> select now();
> EOF
>


That isn't going to work because net_test.sh isn't called until after the
connection is authenticated.

It is difficult to interrupt the process during the brief instant between
when the connection was opened and when it is authenticated.

Start psql, and when it is waiting for the password, find the pid for psql
and start gdb against the psql process (gdb -p <pid>)

In gdb, do:

(gdb) b PQconnectStartParams
Breakpoint 1 at 0x7f5de60bdf70: file fe-connect.c, line 561.
(gdb) c

Then go back and complete the password in psql.  The gdb session will have
triggered the breakpoint.

Wait for less than the timeout, and hit 'c' and enter in the debugger.  The
connection will complete.

Or, wait for more than the timeout and hit 'c' and enter in the debugger.
The connection will error out, as the server side hung up on it.

Cheers,

Jeff

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

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: BUG #13617: ecpg cannot handle boolean field within a structure
Следующее
От: 林俊彥
Дата:
Сообщение: Re: [Bug / Question ] " authentication_timeout " is invalid.