RE: CopyManager.copyOut stuck in socket read

Поиск
Список
Период
Сортировка
От Karthik Shivashankar
Тема RE: CopyManager.copyOut stuck in socket read
Дата
Msg-id 9fc11af3aa9c4906b2a11ffd486d43ba@sandvine.com
обсуждение исходный текст
Ответ на Re: CopyManager.copyOut stuck in socket read  (Sehrope Sarkuni <sehrope@jackdb.com>)
Список pgsql-jdbc

Thanks Sehrope. I will check further and get back to you.

 

From: Sehrope Sarkuni <sehrope@jackdb.com>
Sent: Wednesday, May 20, 2020 6:26 PM
To: Karthik Shivashankar <kshivashank@sandvine.com>
Cc: pgsql-jdbc@postgresql.org; Doug Fickling <dfickling@sandvine.com>; Padam Sonar <psonar@sandvine.com>; Raghavendra Chikmagalur Eswarappa <reswarappa@sandvine.com>
Subject: Re: CopyManager.copyOut stuck in socket read

 

[EXTERNAL]

On Wed, May 20, 2020 at 3:34 AM Karthik Shivashankar <kshivashank@sandvine.com> wrote:

We are using a java application that does something like “COPY (select xyz from abc ) TO filename.csv.gz” using JDBC to postgres 9.3.11 server.

 

A COPY command which outputs to a server file must be executed as a regular query, not as a COPY statement. Use a regular JDBC java.sql.Statement, not the PGJDBC driver specific CopyManager classes.

The PGJDBC specific CopyManager classes are for COPY operations that read "... FROM STDIN" or write "... TO STDOUT".

 

I'm not sure exactly what's causing it to hang but I bet it's waiting for COPY related messages from the server that are never arriving because the executed command is not returning a COPY stream.


Regards,

-- Sehrope Sarkuni

Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

 

Disclaimer:
This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is considered confidential, proprietary, sensitive and/or otherwise legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.

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

Предыдущее
От: Sehrope Sarkuni
Дата:
Сообщение: Re: CopyManager.copyOut stuck in socket read
Следующее
От: Dave Cramer
Дата:
Сообщение: [pgjdbc/pgjdbc] 7ef93f: refactor: Clean up whitespace in existingPgSQLXML...