psql \copy hanging

Поиск
Список
Период
Сортировка
От Arnaud L.
Тема psql \copy hanging
Дата
Msg-id d5df5507-7491-5877-5412-c9325d0ec49c@codata.eu
обсуждение исходный текст
Ответы Re: psql \copy hanging  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: psql \copy hanging  (Jerry Sievers <gsievers19@comcast.net>)
Re: psql \copy hanging  ("Arnaud L." <arnaud.listes@codata.eu>)
Список pgsql-general
Hi list

On Windows, I have an unattended script that exports data overnight by 
issuing psql commands like :
psql -f mycommands.sql
whith mycommands.sql containing a bunch of \copy lines like :
\copy (SELECT * FROM someview) TO 
'\\windowsserver\windowsshare\somefile.csv'

When I run this script by hand, everything is fine but when it runs 
overnight it hangs and allways on the same line.
There is no lock in the database, and the connection is marked as active 
in the backend and running the statement "COPY (SELECT * FROM myview) TO 
STDOUT".
So where can things be hanging ?
My first guess (appart from db lock) was that the target file was locked 
by the filesystem. But wouldn't psql know about it and fail with an error ?

Thanks for your help !

--
Arnaud



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Rename a column if not already renamed.?
Следующее
От: Reid Thompson
Дата:
Сообщение: Re: Importing from CSV, auto creating table?