The postgresql field is of type xml. data is successfully added to the table via INSERT; the maximum successfully inserted field is about 2Mb in size; when it comes to inserting a string in the database in which the field size is ~ 12Mb, I get an error Connection to the server has been lost . What to insert without a difference, php pg_insert or pg_query, or even write the request to a file and execute it via the command line and psql. If you change the field type to text, the insertion passes without problems, but if you then make a query of the type select cast (my_field as xml) ... then there will also be a Connection . What could be the reason? In postgresql.conf looked, but did not find suspicious parameters. Postgres version - 10.5 What could be the problem?
- I immediately remembered this discussion: postgresql.org/message-id/flat/… What OS, check in the database logs what is happening in reality. If I guess correctly, then this is a known libxml2 bug and is not treated by the base. - Shallow
- @ Small thanks for the tip. OS centos7. I didn’t dig deep, but it mentions the same file from the same source as mine. he has egrul / HSF_LL_2018-01-01_X.XML, I have egrul / SGS_2018-10-02_1.ZIP / GO_2018-10-02_346536.XML and yes, in php, they parsed me, only with the HUGE option enabled. Now the base has migrated to the latest release of postgres 11, the result is the same - tema n
|