On Jan 20, 1:04 pm, paddor <[email protected]> wrote:
> Hello
>
> The call should execute an SQL statement like "COPY ... FROM stdin;"
> as visible in the first file of the gist [1].
> But it hangs instantly and eats up all memory in a few seconds (got to
> kill -9 it).
>
> As you can see in the gist as well, a workaround would be to use
> #synchronize and then PGconn#exec on the passed object.
>
> I added the relevant part of the strace output to the gist (second
> file).
>
> Strangely, this only ocurres on one of our production machines.
> It works on Red Hat Enterprise Linux Server 5.1 running kernel
> 2.6.18-53.e15.
> It doesn't work on SUSE Linux Enterprise Server 10 (patchlevel 2)
> running kernel 2.6.16.60-0.21-smp.
> Both machines are running a x86_64 kernel and have a CPU with 4 cores.
>
> The PostgreSQL cluster is running on the SUSE server. Its version is
> 8.4.3.
>
> I look forward to seeing this bug fixed. Thank you in advance. :-)

PostgreSQL COPY in not supported by Database#run.  Database#run is for
executing a single SQL query string, COPY is significantly more
involved.  You need to drop down to the connection level via
synchronize if you want to use COPY.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to