Re: psql \copy hanging

From: "Arnaud L(dot)" <arnaud(dot)listes(at)codata(dot)eu>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: psql \copy hanging
Date: 2019-10-08 09:47:56
Message-ID: b67fdd28-3551-0645-755c-77bb68229bb6@codata.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le 08/10/2019 à 09:28, Pavel Stehule a écrit :
> you can write simple C application with COPY API
> https://www.postgresql.org/docs/12/libpq-copy.html

Unfortunately, I don't know C.

> Then you can eliminate or ensure locality of problem.
>
> more, you can use server side copy. Superuser can read data from server
> file system.

Yes, but in this case the file has to be written to a network share, and
the windows user under wich PostgreSQL runs (Network Service) cannot be
given write permission on this share.
That's the reason for the use of \copy.

Now that I think about it, *maybe* this started happening after a server
upgrade. Since this is intermittent, I'm not really sure about this, but
some time ago we moved our server to a different hardware and upgraded
from 9.3 to 11 at the same time.
The dates don't perfectly match though, we upgraded around 8th of august
and the problem arose ~2 weeks later for the first time.
The client was upgraded around that same time period (not exactly the
same time if I remember correctly).

Regards
--
Arnaud

In response to

Browse pgsql-general by date

  From Date Subject
Next Message PegoraroF10 2019-10-08 09:51:40 Re: Performance on JSONB select
Previous Message Pavel Stehule 2019-10-08 07:28:19 Re: psql \copy hanging