pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Matthias Apitz <guru@unixarea.de>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: error messages (autovaccum canceled and syntax errors) while loading a DUMP
Date: Thu, 25 Jun 2020 15:41:54 -0400
Message-ID: <2290032.1593114114@sss.pgh.pa.us> (raw)
In-Reply-To: <fae083a8-dfc6-a133-aaa3-95af8011f70f@aklaver.com>
References: <20200625111137.GA15798@sh4-5.1blu.de>
	<20200625125402.GA27634@sh4-5.1blu.de>
	<bdddf16b-b9df-4092-d8e7-78604736b8a3@aklaver.com>
	<20200625180329.GA19346@sh4-5.1blu.de>
	<fae083a8-dfc6-a133-aaa3-95af8011f70f@aklaver.com>

Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 6/25/20 11:03 AM, Matthias Apitz wrote:
>> 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?

The perl fragment you show is similar to what's reported in the error
message, but it doesn't quite match, so I'm not 100% sold on the
theory that that's somehow not been quoted correctly.  However,
regardless of the exact details, it seems like the most likely theory
about what is happening is that the dump file is corrupt and the
corruption is causing the de-gzipped output to be missing or
duplicating chunks of text.  (Given the way gzip compression works,
that wouldn't be a very surprising symptom.)  So that leads me to
wonder what was done to the dump file in between creation and use.
One idea, seeing that the dump file was not given a ".gz" extension
that would reflect its compressed state, is that something thought it
was plain text and tried to do a newline conversion on it.  If it was
passed through email that would be a really plausible mechanism...

			regards, tom lane





view thread (14+ messages)  latest in thread

Message-ID: <2290032.1593114114@sss.pgh.pa.us>
Permalink:  ../2290032.1593114114@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2290032.1593114114@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, guru@unixarea.de
  Subject: Re: error messages (autovaccum canceled and syntax errors) while loading a DUMP
  In-Reply-To: <2290032.1593114114@sss.pgh.pa.us>
  References: <20200625111137.GA15798@sh4-5.1blu.de> <20200625125402.GA27634@sh4-5.1blu.de> <bdddf16b-b9df-4092-d8e7-78604736b8a3@aklaver.com> <20200625180329.GA19346@sh4-5.1blu.de> <fae083a8-dfc6-a133-aaa3-95af8011f70f@aklaver.com> <2290032.1593114114@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox