Migrating from 9.2.4 to 9.3.0 with XML DOCTYPE

From: Tim Kane <tim(dot)kane(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Migrating from 9.2.4 to 9.3.0 with XML DOCTYPE
Date: 2014-06-04 12:05:48
Message-ID: CFB4CA2B.83D58%tim.kane@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi all,

I’m migrating a database from 9.2.4 to 9.3.0 and encountering an issue with
an XML field failing to restore.

I’m using pg_dump 9.3.0 as follows (with 9.2.4 on 5433 and 9.3.0 on 5432).
I have verified my paths, it’s definitely using the 9.3.0 binaries. Both
source and target are using UTF8 encoding.

pg_dump -p 5433 content_xml_test | psql content_xml_test -p 5432 –v
ON_ERROR_STOP=1
<snipped>
CREATE SEQUENCE
Time: 0.870 ms
ALTER TABLE
Time: 0.199 ms
ALTER SEQUENCE
Time: 0.380 ms
ALTER TABLE
Time: 0.931 ms
Time: 10.883 ms

ERROR: invalid XML content
DETAIL: line 1: StartTag: invalid element name
<!DOCTYPE Catalog SYSTEM "../../../../../../../../test.dtd">
^
CONTEXT: COPY xml_test, line 13, column document: "<!DOCTYPE Catalog SYSTEM
"../../../../../../../../test.dtd">

However, if I do the following:

ALTER DATABASE content_xml_test SET XMLOPTION TO DOCUMENT;

ERROR: invalid XML document
DETAIL: line 1: Start tag expected, '<' not found
1046710
^
CONTEXT: COPY test_lookup, line 1, column external_ref: "{1046710,1046711}"
Time: 14.828 ms

This is even more interesting, since the external_ref column is a totally
different field, and a different type. I suspect the failure is still
valid, but it’s reporting the wrong field name as being the culprit.

I suspect this might be resolved in a newer point release of 9.3, however I
don’t have the luxury on this particular host right now.

Any suggestions how I might convince 9.3.0 to accept the dump from 9.2.4?

Cheers,

Tim

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bhushan Pathak 2014-06-04 12:20:37 PostgreSQL 9.2.4 + CentOS 6.5 64 bit - segfault error in initdb
Previous Message Tim Kane 2014-06-04 11:59:55 Migrating from 9.2.4 to 9.3.0 with XML DOCTYPE

Browse pgsql-hackers by date

  From Date Subject
Next Message David G Johnston 2014-06-04 12:20:53 Re: Migrating from 9.2.4 to 9.3.0 with XML DOCTYPE
Previous Message Abhijit Menon-Sen 2014-06-04 10:47:16 pg_xlogdump --stats