Large object corruption during 'piped' pg_restore - Mailing list pgsql-general

From Bosco Rama
Subject Large object corruption during 'piped' pg_restore
Date
Msg-id 4D38A813.2030605@boscorama.com
Whole thread Raw
Responses Re: Large object corruption during 'piped' pg_restore  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi folks,

We've discovered (or possibly rediscovered?) a corruption when restoring large
objects.

If 'standard_conforming_strings = on' is set in our DB (which is required for
our app) then the piped restore method (e.g. pg_restore -O backup.dat | psql)
results in the large objects being corrupted.

However, when we use the DB-direct restoration method
(e.g. pg_restore -O -d dbname backup.dat) it works just fine.

If I take the output of the non-DB pg_restore command and edit it to set the
standard_conforming_strings off just prior to the large object creation and
then back on again immediately after the last one is created, it works.

It appears that the escaping of the strings used in the lowrite() functions
is not happening properly.

Is this something that is known and should just be avoided?  Or is it something
that needs reporting?

TIA.

Bosco.

pgsql-general by date:

Previous
From: Ralph Smith
Date:
Subject: Re: A Query that works standalone but not in a f(x)
Next
From: Tom Lane
Date:
Subject: Re: Large object corruption during 'piped' pg_restore