Re: psycopg2 conn.poll() hangs when used with sshtunnel

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: psycopg2 conn.poll() hangs when used with sshtunnel
Date: 2018-10-30 16:07:25
Message-ID: CA+mi_8ZWW-NsDmAkT0adTgO8uHnAJRYU2fJ=6yuLTeL5J-cQaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Tue, Oct 30, 2018 at 3:57 PM Akshay Joshi
<akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>
> I have one more observation when i run this application one out of 10 times it works. I have logged one more issue as COPY command hangs, so thought it is the problem in psycopg2

The problem with COPY was a different one: we just didn't manage the
state resulting by running COPY through execute, and ended up looping
forever on fake results returned by the libpq. The condition was
detected and handled for COPY BOTH (resulting by replication
statements) but not for the normal COPY TO/FROM. See
<https://github.com/psycopg/psycopg2/issues/781>.

This is a different story but, as described in
<https://github.com/pahaz/sshtunnel/issues/135> it seems that even if
we are doing something not entirely legit with
isBusy/consumeInput/getResult, it only becomes a problem through the
sshtunnel module, not through ssh -L.

-- Daniele

In response to

Browse psycopg by date

  From Date Subject
Next Message Tony Shelver 2018-10-31 06:35:55 Max message size / constraints?
Previous Message Akshay Joshi 2018-10-30 15:57:39 Re: psycopg2 conn.poll() hangs when used with sshtunnel