New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The pgloader is not responding (with a lot of errors after Ctrl+C). #705
Comments
Can you share a self-contained example for me to reproduce your error here? It seems that one key to this problem is the PostgreSQL error type being reported: |
Below I attach an example of a table schema and an example of a file for import, which gives the error above. |
Thanks for the test case! Here's what I get with it, given the following load file:
Note that
Also the following DROP TABLE IF EXISTS t705;
CREATE TABLE t705
(
"FirstName" text ,
"LastName" text ,
"MiddleName" text ,
"Telephone" text ,
"Car" text ,
"Passport" text ,
"DayBirth" smallint,
"MonthBirth" smallint,
"YearBirth" smallint,
"SNILS" text ,
"INN" text ,
"Information" text ,
"Base" text
); |
The option "fields optionally enclosed by" was missing a way to easily specify a single quote as the quoting character. Add '\'' to the existing solution '0x27' which isn't as friendly. See #705.
So please build pgloader from fresh sources and try again. Also you will now be able to use the following definition for import:
|
I use next commands file (I've already got an idea about 0x27 for a long time and I use it actively, because simple escaping did not work ...):
Do you see an error with this config? |
A similar error (22P02) is observed in other files (with the same table and config), where incorrect input is specified instead of smallint (ex.: |
Which version of pgloader are you using? did you try with a local build from current git master version? |
|
Yeah, please try with current git version, and report back. Given that I can't reproduce, I expect it'll fix it for you! |
It seems that the update helped. However, I'm still testing. I keep you informed, thank you! |
The previous patch introduced parser conflicts and we couldn't parse some expressions any more, such as the following: fields escaped by '\', It's now possible to represent single quote as either '''', '\'', or '0x27' and we still can parse '\' as being a single backslash character. See #705.
Any news? Shall we close the issue now? |
Hello, Dimitri!
Once I started importing a large CSV file. In the process, the program showed such errors:
This is okay, however, after that the pgloader did not respond. I waited a very long time (several hours)...
In total, I could not stand it and made a forced stop pgloader using
Ctrl+C
After that, the pgloader showed a huge bunch of errors. I attach them to pastebin: https://pastebin.com/pd4btiu8
What was it and why did the pgloader hang?
The text was updated successfully, but these errors were encountered: