Search Postgresql Archives

Re: Windows to Linux PostgreSQL Migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andy, thank you for the quick response but I figured out the problem.  I
recalled reading something regarding the bytea data type in 9.0
migration/release notes and decided to look into that.  It turns out that
changing the default output format to "hex" from "escape" is the cause of
the issue.  I restarted the server the "bytea_output = escape" and I am once
again able to view my PDF files.

The notes are very vague as to WHY this change but at least getting the
original behavior back isn't that difficult.  I am just curious whether (or
even how) I would change my Java code (JDBC) to use the newly default "hex"
format that appears to be preferred over the "escape" format.

Dave

-----Original Message-----
From: Andy Colson [mailto:andy@xxxxxxxxxxxxxxx] 
Sent: Tuesday, February 01, 2011 4:59 PM
To: David Johnston
Cc: pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  Windows to Linux PostgreSQL Migration

On 2/1/2011 3:44 PM, David Johnston wrote:
> Hello,
>
> I have just done a multi-part migration and am having difficulty 
> viewing binary content stored in a "bytea" field; specifically I 
> stored a PDF in the existing setup and now receive a "File does not begin
with '%PDF-'"
> message when I go to pull it up from the new setup.
>
> The specific migration is as follows:
>
> Existing: Windows 2000 (32bit); PostgreSQL 8.2
>
> New: Ubuntu 10.10 (64bit); PostgreSQL 9.0
>
> To migrate the data I did the following:
>
> Pg_dump (v 8.3) from the existing Windows (32) Machine into a dump 
> file on an NTFS file system.
>
> Pg_restore (v 9.0) from a different Windows (64) machine from the dump 
> file into the running Linux (64) server.
>
> Using the same application software and JRE (Tomcat container) I 
> attempted to view the files as normal (using Firefox on a Windows
> Machine) and the "File does not begin with '%PDF-'" message appears.
>
> I can think of some possible variations and causes for this but 
> figured before I go running for the cliff I'd see if anyone can at 
> least point me in the right direction.
>
> Thank You
>
> David Johnston
>

Not sure if it'll help, but you could try the pg_dump from version 9 to do
the backup.

-Andy


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux