From: Karthik Shivashankar <kshivashank@sandvine.com>
To: Sehrope Sarkuni <sehrope@jackdb.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Cc: Doug Fickling <dfickling@sandvine.com>
Cc: Padam Sonar <psonar@sandvine.com>
Cc: Raghavendra Chikmagalur Eswarappa <reswarappa@sandvine.com>
Subject: RE: CopyManager.copyOut stuck in socket read
Date: Wed, 20 May 2020 14:14:21 +0000
Message-ID: <9fc11af3aa9c4906b2a11ffd486d43ba@sandvine.com> (raw)
In-Reply-To: <CAH7T-aoTjLs9C3=4x+cEtHOK+9CB_8A-oJdinQmczc7z2bMnuQ@mail.gmail.com>
References: <9e27f4f07fed4670a2dbbbe77a0f4e0f@sandvine.com>
<CAH7T-aoTjLs9C3=4x+cEtHOK+9CB_8A-oJdinQmczc7z2bMnuQ@mail.gmail.com>
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<mailto: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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: kshivashank@sandvine.com, sehrope@jackdb.com, dfickling@sandvine.com, psonar@sandvine.com, reswarappa@sandvine.com
Subject: Re: CopyManager.copyOut stuck in socket read
In-Reply-To: <9fc11af3aa9c4906b2a11ffd486d43ba@sandvine.com>
References: <9e27f4f07fed4670a2dbbbe77a0f4e0f@sandvine.com> <CAH7T-aoTjLs9C3=4x+cEtHOK+9CB_8A-oJdinQmczc7z2bMnuQ@mail.gmail.com> <9fc11af3aa9c4906b2a11ffd486d43ba@sandvine.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox