I found out the problem was that 2 db instances were logging to the same file.
The file seems not to be locked when 1 system is logging so they were conflicting and combining lines.
So this is not a bug.
Sorry for the inconvenience.
-----Original Message-----
From: PG Bug reporting form <noreply@postgresql.org>
Sent: Tuesday, 14 September 2021 11:47
To: pgsql-bugs@lists.postgresql.org
Cc: Jef Vervecken <jef.vervecken@ubench.com>
Subject: BUG #17192: The csvlog is corrupted
The following bug has been logged on the website:
Bug reference: 17192
Logged by: Jef Vervecken
Email address: jef.vervecken@ubench.com
PostgreSQL version: 13.4
Operating system: Ubuntu 18.04
Description:
The content of the csvlog file seems to be corrupted. Most lines are correct but some lines seems to be merged.
I'll put 3 lines here, first and third lines are correct, but the second line is corrupted. This result ofcourse in
errorswhen I try to import the logs into a table via the copy command:
line 1:
2021-09-13 13:03:17.132
CEST,"postgres","ubenchdb",5361,"10.0.10.109:50726",613f2ff5.14f1,1,"idle",2021-09-13
13:03:17 CEST,3/0,0,LOG,08006,"could not receive data from client:
Connection reset by peer",,,,,,,,,"postgres_fdw","client backend"
Line 2:
2021-09-13 13:03:17.193
CEST,"postgres","ubenchdb",5362,"10.0.10.109:50728",613f2ff5.14f2,1,"idle",2021-09-13
13:03:17 CEST,3/0,0,LOG,08006,"could not receive data from client:
Connection reset by peer",,,,,,t: Connection reset by peer",,,,,,,,,"postgres_fdw","client backend"
Line 3:
2021-09-13 13:04:09.423
CEST,"postgres","ubenchdb",32291,"10.0.10.109:33276",613f3029.7e23,1,"idle",2021-09-13
13:04:09 CEST,79/0,0,LOG,08006,"could not receive data from client:
Connection reset by peer",,,,,,,,,"postgres_fdw","client backend"