From: ljb <lbayuk@mindspring.com>
To: pgsql-interfaces@postgresql.org
Subject: libpgtcl COPY out problem - why PQgetlineAsync() ?
Date: Tue, 1 Apr 2003 00:51:14 +0000 (UTC)
Message-ID: <b6anq2$1vkr$1@news.hub.org> (raw)
While working to get Pgaccess up with my pure-Tcl interface (pgin.tcl,
available on gborg), I found that COPY TO STDOUT is not working with
libpgtcl. Or, it is working so slowly it might as well not work. Or, it
works for small data sets but fails for large ones. This happens with both
the bundled PostgreSQL-7.3.2 libpgtcl and the beta libpgtcl on gborg. For
example, with Pgaccess, I can import records at about 5,000 per second, but
when I export records it goes at about 20 per second.
It looks to me like the problem is in PgInputProc() which reads from the
PostgreSQL connection during COPY TO STDOUT. Why is this doing non-blocking
reads using PQgetlineAsync()? If there isn't a complete line of data
available from the backend, this will return 0, which Tcl will see as EOF
since the channel is in non-blocking mode. Am I missing something?
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: lbayuk@mindspring.com
Subject: Re: libpgtcl COPY out problem - why PQgetlineAsync() ?
In-Reply-To: <b6anq2$1vkr$1@news.hub.org>
* 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