From: | Rémi Cura <remi(dot)cura(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | Helen Griffiths <helen(dot)griffiths(at)durham(dot)ac(dot)uk>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Cannot import logs from csv |
Date: | 2013-10-18 15:49:17 |
Message-ID: | CAJvUf_t1pzvn-5derDTBTKWX0SZMeirEwwtkOis_dzLOkMK=Rw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hey,
Can you check the line 424855 in the file maincluster-20131011.csv .
Yo may have a comma in unprotected field, or empty field, or wrong end
line, etc.
Cheers,
Rémi -C
2013/10/18 Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
> On 10/18/2013 08:07 AM, Helen Griffiths wrote:
>
>> Hello.
>>
>> I've got a table set up on server B to store the logs from server A, as
>> outlined in
>> http://www.postgresql.org/**docs/8.4/static/runtime-**
>> config-logging.html#RUNTIME-**CONFIG-LOGGING-CSVLOG<http://www.postgresql.org/docs/8.4/static/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-CSVLOG>
>>
>>
>
>> Every day, I set \encoding SQL_ASCII on server B (server A is SQL_ASCII)
>> and use \copy with the csv flag to upload yesterday's log file to the
>> table. For months, this has worked flawlessly until 12th October. The
>> import failed with a message:
>> postgres=# \copy maincluster_log FROM maincluster-20131011.csv CSV
>> ERROR: extra data after last expected column
>> CONTEXT: COPY maincluster_log, line 424855: "2013-10-11 15:58:59.463
>> BST,"apachemitre","course_**records",30875,"[local]",**
>> 52581233.789b,3,"idle",20..."
>>
>>
>> The failing line, I will give at the end because it is long.
>>
>> PostgreSQL version on both servers is 8.4, running on CentOS 6.3.
>>
>> Please, does anyone have some insight into why this fails?
>>
>
> This came up before recently in this thread:
>
> http://www.postgresql.org/**message-id/**CADK3HHJNEWKD9gNyXmjv9ABbn+**
> 37rY3Mvp9=1j7msg9YpoBBBw(at)mail(dot)**gmail(dot)com<http://www.postgresql.org/message-id/CADK3HHJNEWKD9gNyXmjv9ABbn+37rY3Mvp9=1j7msg9YpoBBBw@mail.gmail.com>
>
> To cut to the chase, in that case the OP found:
>
> "Ok, I found the offending line. It was not the pgadmin line. There was a
> line with a large binary insert."
>
> Not sure if that helps.
>
>
>> Helen Griffiths
>>
>>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/**mailpref/pgsql-general<http://www.postgresql.org/mailpref/pgsql-general>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2013-10-18 15:49:49 | Re: Need some help on Performance 9.0.4 |
Previous Message | Tom Lane | 2013-10-18 15:42:50 | Re: when do I analyze after concurrent index creation? |