Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPARE sid_sisisinst FROM :select_anw;'
Дата
Msg-id 9787.1589124821@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPAREsid_sisisinst FROM :select_anw;'  (Matthias Apitz <guru@unixarea.de>)
Ответы Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPAREsid_sisisinst FROM :select_anw;'
Список pgsql-general
Matthias Apitz <guru@unixarea.de> writes:
> 1. In addition to the above code, can I get somehow the connecting client's PID? If

Not in any portable way.  If you believe that the offending client is on
the local system, you could try building something involving netstat,
lsof, etc.  getpeereid() might be useful too.

> 2. Can I get something out of the buffer of the startup packet?

I'm fairly sure that at the point where the error is thrown, we've
only read the putative length word, so there's nothing buffered.
But sure, you could try to collect whatever is available from the
socket and dump that --- probably a hex dump would be advisable,
because it'll contain \0 bytes.  Seems like a good idea.

            regards, tom lane



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

Предыдущее
От: Matthias Apitz
Дата:
Сообщение: Re: PostgreSQL client hangs sometimes on 'EXEC SQL PREPAREsid_sisisinst FROM :select_anw;'
Следующее
От: Mary Johnson
Дата:
Сообщение: what to log in csvlogs