Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joROM-0003Ln-8n for pgsql-general@arkaria.postgresql.org; Thu, 25 Jun 2020 12:54:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1joROL-0006zB-4e for pgsql-general@arkaria.postgresql.org; Thu, 25 Jun 2020 12:54:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joROK-0006z3-SY for pgsql-general@lists.postgresql.org; Thu, 25 Jun 2020 12:54:08 +0000 Received: from sh4-5.1blu.de ([178.254.11.41]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joROI-0005BO-6J for pgsql-general@lists.postgresql.org; Thu, 25 Jun 2020 12:54:07 +0000 Received: from ftp51246-2575596 by sh4-5.1blu.de with local (Exim 4.90_1) (envelope-from ) id 1joROE-0007X0-JI; Thu, 25 Jun 2020 14:54:02 +0200 Date: Thu, 25 Jun 2020 14:54:02 +0200 From: Matthias Apitz To: pgsql-general@lists.postgresql.org Subject: Re: error messages (autovaccum canceled and syntax errors) while loading a DUMP Message-ID: <20200625125402.GA27634@sh4-5.1blu.de> Reply-To: Matthias Apitz References: <20200625111137.GA15798@sh4-5.1blu.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20200625111137.GA15798@sh4-5.1blu.de> X-Operating-System: FreeBSD 12.0-CURRENT r314251 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk El d=C3=ADa jueves, junio 25, 2020 a las 01:11:37p. m. +0200, Matthias Apit= z escribi=C3=B3: >=20 > Hello >=20 > A PG dump file was produced on a 11.4. server the usual ways. > When it is loaded with >=20 > $ gzip -dc newanna_export.dmp | /usr/local/sisis-pap/pgsql/bin/psql -U si= sis sisis >=20 > it gives lots of error messages in the server log as: >=20 > ... >=20 > and also syntax errors like: >=20 > 2020-06-25 12:02:15.509 CEST [32719] ERROR: syntax error at or near "ord= er" at character 652 > 2020-06-25 12:02:15.509 CEST [32719] STATEMENT: select id, brgroup, ins_= time, upd_time, task_1, task_2, task_3, int_sel_1, int_sel_2, int_sel_3, in= t_sel_4, int_sel_5, str_sel_1, str_sel_2, str_sel_3, dat_sel_1, dat_sel_2, = sel_seq_1, sel_seq_2, int_val_1, int_val_2, int_val_3, int_val_4, int_val_5= , str_val_1, str_val_2, str_val_3, str_val_4, str_val_5, valtype_1, valtype= _2, valtype_3, valtype_4, valtype_5, valtype_6, valtype_7, valmode_1, valmo= de_2, valmode_3, valmode_4, valmode_5, valmode_6, valmode_7, valname_1, val= name_2, valname_3, valname_4, valname_5, valname_6, valname_7, valcont_1, v= alcont_2, valcont_3, valcont_4, valcont_5, valcont_6, valcont_7, sel_seq_3 = =66rom acq_vardata where id=3D order by sel_seq_3 > 2020-06-25 12:06:42.098 CEST [306] ERROR: syntax error at or near "q" at= character 1 > 2020-06-25 12:06:42.098 CEST [306] STATEMENT: q > select count(*) from ig_bigstrings ; >=20 > What could be the reason for this? I looked in the dump file after uncompressing it. The 'syntax error' comes from: one large table contains in a bytea column Perl code wich our software reads from the table and executes it with Perl. But, why the psql tryes to understand this code when it should INSERT it into the table? This is a bit part of the content of the table: # function: readAcqVarData\n#\n# parameter: where condition (string)\n# ret= urns: array of records\n# $recordList->[0]->{'int_val_1'} =3D "20"= ;\n# $recordList->[0]->{'str_val_1'} =3D "string";\n# $re= cordList->[1]->{'int_val_1'} =3D "99";\n# $recordList->[1]->{'str_= val_1'} =3D "Dummy";\n#\nsub readAcqVarData {\n\tmy ($where) =3D @_;\n\tmy = $recordList =3D undef;\n\tmy $ipos_valcont_7 =3D 56; # position valcont_7-S= palte in select-statement - 1\n\n\t$debug .=3D "

readAcqVarData()

\= \n" if $debugOn;\n\n\t$erg =3D selectData(\n\t\t "select id, brgroup, in= s_time, upd_time, task_1, task_2, task_3, "\n\t\t . "int_sel_1, int_sel_2,= int_sel_3, int_sel_4, int_sel_5, "\n\t\t . "str_sel_1, str_sel_2, str_sel= _3, dat_sel_1, dat_sel_2, "\n\t\t . "sel_seq_1, sel_seq_2, "\n\t\t . "int= _val_1, int_val_2, int_val_3, int_val_4, int_val_5, "\n\t\t . "str_val_1, = str_val_2, str_val_3, str_val_4, str_val_5, "\n\t\t . "valtype_1, valtype_= 2, valtype_3, valtype_4, valtype_5, valtype_6, valtype_7, "\n\t\t . "valmo= de_1, valmode_2, valmode_3, valmode_4, valmode_5, valmode_6, valmode_7, "\n= \t\t . matthias --=20 Matthias Apitz, =E2=9C=89 guru@unixarea.de, http://www.unixarea.de/ +49-176= -38902045 Public GnuPG key: http://www.unixarea.de/key.pub May, 9: =D0=A1=D0=BF=D0=B0=D1=81=D0=B8=CC=81=D0=B1=D0=BE =D0=BE=D1=81=D0=B2= =D0=BE=D0=B1=D0=BE=D0=B4=D0=B8=D1=82=D0=B5=D0=BB=D0=B8! Thank you very much= , Russian liberators!