I'm trying to dump a database from a 7.1.3 server to a 7.4.2 one.
It doesn't works because of difference in COPY format (unless I use -d
which is VERY slow on a 16G database).
What are the difference between the 7.1.3 and 7.4.2 formats (seems to be
related at least to newlines) ? Is it possible to modify the dump with a sed
script to make it usable by 7.4.2 ?
Thanks
cyril
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org 7 2057
"Cyril VELTER" <cy**********@m etadys.com> writes: I'm trying to dump a database from a 7.1.3 server to a 7.4.2 one.
It doesn't works because of difference in COPY format (unless I use -d which is VERY slow on a 16G database).
Try using the 7.4.2 version of pg_dump to dump out the 7.1.3
database. pg_dump is written to talk to multiple versions of the
server, and it's generally recommended to use the same version of
pg_dump as the server you're restoring into.
-Doug
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
From: "Doug McNaught" <do**@mcnaught. org> "Cyril VELTER" <cy**********@m etadys.com> writes:
I'm trying to dump a database from a 7.1.3 server to a 7.4.2 one.
It doesn't works because of difference in COPY format (unless I
use -d which is VERY slow on a 16G database).
Try using the 7.4.2 version of pg_dump to dump out the 7.1.3 database. pg_dump is written to talk to multiple versions of the server, and it's generally recommended to use the same version of pg_dump as the server you're restoring into.
That's what I already do, but the problem is in COPY TO format (which is
handled by the backend ? right ?)
cyril
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
On Mon, May 31, 2004 at 07:57:01AM +0200, Cyril VELTER wrote: From: "Doug McNaught" <do**@mcnaught. org>
"Cyril VELTER" <cy**********@m etadys.com> writes:
I'm trying to dump a database from a 7.1.3 server to a 7.4.2 one. It doesn't works because of difference in COPY format (unless I use -d which is VERY slow on a 16G database).
Try using the 7.4.2 version of pg_dump to dump out the 7.1.3 database. pg_dump is written to talk to multiple versions of the server, and it's generally recommended to use the same version of pg_dump as the server you're restoring into.
That's what I already do, but the problem is in COPY TO format (which is handled by the backend ? right ?)
What backend? 7.4-pg_dump will generate 7.4-backend's compatible
input, and the 7.1-backend does not interact at all --- save with
7.4-pg_dump, which will make itself understood easily ...
Lots of people (including me) use this procedure to upgrade rather
smoothly. What's your problem exactly?
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"In a specialized industrial society, it would be a disaster
to have kids running around loose." (Paul Graham)
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
From: "Alvaro Herrera" <al******@dcc.u chile.cl> On Mon, May 31, 2004 at 07:57:01AM +0200, Cyril VELTER wrote: From: "Doug McNaught" <do**@mcnaught. org> "Cyril VELTER" <cy**********@m etadys.com> writes:
> I'm trying to dump a database from a 7.1.3 server to a 7.4.2 one. > It doesn't works because of difference in COPY format (unless I > use -d which is VERY slow on a 16G database).
Try using the 7.4.2 version of pg_dump to dump out the 7.1.3 database. pg_dump is written to talk to multiple versions of the server, and it's generally recommended to use the same version of pg_dump as the server you're restoring into.
That's what I already do, but the problem is in COPY TO format (which is handled by the backend ? right ?)
What backend? 7.4-pg_dump will generate 7.4-backend's compatible input, and the 7.1-backend does not interact at all --- save with 7.4-pg_dump, which will make itself understood easily ...
Lots of people (including me) use this procedure to upgrade rather smoothly. What's your problem exactly?
Thanks for your response,
Perhaps I'm mistaken, but it seems that pg_dump (the 7.4 one) will send
a COPY to STDOUT command to the 7.1 backend and blindly copy the output to
the dump file.
Here's the kind of errors I get :
ERROR: literal carriage return found in data
HINT: Use "\r" to represent carriage return.
CONTEXT: COPY c244, line 221: "662188 1002 1002 2002-08-05
12:15:12.20+00 2002-08-05 12:15:12.20+00 274 0000
010001002020100 00000000..."
By looking more closely in the dump file, there is a CR (embedded in a
text field) which is not encoded and confuse the restore
cyril
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly
Quoting Cyril VELTER <cy**********@m etadys.com>: From: "Alvaro Herrera" <al******@dcc.u chile.cl> On Mon, May 31, 2004 at 07:57:01AM +0200, Cyril VELTER wrote: From: "Doug McNaught" <do**@mcnaught. org> > "Cyril VELTER" <cy**********@m etadys.com> writes: > > > I'm trying to dump a database from a 7.1.3 server to a 7.4.2 one. > > It doesn't works because of difference in COPY format (unless I > > use -d which is VERY slow on a 16G database). > > Try using the 7.4.2 version of pg_dump to dump out the 7.1.3 > database. pg_dump is written to talk to multiple versions of the > server, and it's generally recommended to use the same version of > pg_dump as the server you're restoring into.
That's what I already do, but the problem is in COPY TO format (which is handled by the backend ? right ?)
What backend? 7.4-pg_dump will generate 7.4-backend's compatible input, and the 7.1-backend does not interact at all --- save with 7.4-pg_dump, which will make itself understood easily ...
Lots of people (including me) use this procedure to upgrade rather smoothly. What's your problem exactly?
Thanks for your response,
Perhaps I'm mistaken, but it seems that pg_dump (the 7.4 one) will send a COPY to STDOUT command to the 7.1 backend and blindly copy the output to the dump file.
Here's the kind of errors I get :
ERROR: literal carriage return found in data HINT: Use "\r" to represent carriage return. CONTEXT: COPY c244, line 221: "662188 1002 1002 2002-08-05 12:15:12.20+00 2002-08-05 12:15:12.20+00 274 0000 010001002020100 00000000..."
By looking more closely in the dump file, there is a CR (embedded in a text field) which is not encoded and confuse the restore
cyril
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to ma*******@postg resql.org so that your message can get through to the mailing list cleanly
Cyril,
Maybe I'm misunderstandin g you but are you saying you already have the dump
file? If not (of if you can connect to the 7.1.3 server with the 7.4.x dump
program), you can, over tcp/ip, dump the data from 7.1.3 to a file and then
reload that file into your 7.4.x cluster. I've upgraded 7.1.3 to 7.4 and 7.4.1
this way after I found out that the 7.4 pg_dump had problem reading the 7.1.3
file. This is way folks are saying its best to use the dump utils from your
destination cluster (7.4.2 in your case) to move your data.
--
Keith C. Perry, MS E.E.
Director of Networks & Applications
VCSN, Inc. http://vcsn.com
_______________ _______________ ______
This email account is being host by:
VCSN, Inc : http://vcsn.com
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
De : mailto:ne****** @vcsn.com
Emission : 02/06/2004 15:59:31 Quoting Cyril VELTER <cy**********@m etadys.com>: From: "Alvaro Herrera" <al******@dcc.u chile.cl> On Mon, May 31, 2004 at 07:57:01AM +0200, Cyril VELTER wrote: > From: "Doug McNaught" <do**@mcnaught. org> > > "Cyril VELTER" <cy**********@m etadys.com> writes: > > > > > I'm trying to dump a database from a 7.1.3 server to a 7.4.2 one. > > > It doesn't works because of difference in COPY format (unless I > > > use -d which is VERY slow on a 16G database). > > > > Try using the 7.4.2 version of pg_dump to dump out the 7.1.3 > > database. pg_dump is written to talk to multiple versions of the > > server, and it's generally recommended to use the same version of > > pg_dump as the server you're restoring into. > > That's what I already do, but the problem is in COPY TO format > (which is handled by the backend ? right ?)
What backend? 7.4-pg_dump will generate 7.4-backend's compatible input, and the 7.1-backend does not interact at all --- save with 7.4-pg_dump, which will make itself understood easily ...
Lots of people (including me) use this procedure to upgrade rather smoothly. What's your problem exactly? Thanks for your response,
Perhaps I'm mistaken, but it seems that pg_dump (the 7.4 one) will send a COPY to STDOUT command to the 7.1 backend and blindly copy the output to the dump file.
Here's the kind of errors I get :
ERROR: literal carriage return found in data HINT: Use "\r" to represent carriage return. CONTEXT: COPY c244, line 221: "662188 1002 1002 2002-08-05 12:15:12.20+00 2002-08-05 12:15:12.20+00 274 0000 010001002020100 00000000..."
By looking more closely in the dump file, there is a CR (embedded in a text field) which is not encoded and confuse the restore
Maybe I'm misunderstandin g you but are you saying you already have the dump file? If not (of if you can connect to the 7.1.3 server with the 7.4.x dump program), you can, over tcp/ip, dump the data from 7.1.3 to a file and then reload that file into your 7.4.x cluster. I've upgraded 7.1.3 to 7.4 and
7.4.1 this way after I found out that the 7.4 pg_dump had problem reading the 7.1.3 file. This is way folks are saying its best to use the dump utils from your destination cluster (7.4.2 in your case) to move your data.
I've two postgres instances on two different machines (one is 7.1.3 under
cygwin the other 7.4.2 under linux). I use the 7.4 pg_dump binary under linux
to dump the 7.1 database either to a file to inspect it or piped to the 7.4
psql connected to the 7.4 database.
I hope this is more clear.
I've worked out a solution which I have only tested on some tables. I use sed
to replace embeded cr by the escaped form (\r). Will test this out with the
complete database.
Perhaps it's because of cygwin ?
Thanks,
Cyril
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Quoting Cyril VELTER <cy**********@m etadys.com>: De : mailto:ne****** @vcsn.com Emission : 02/06/2004 15:59:31
Quoting Cyril VELTER <cy**********@m etadys.com>: From: "Alvaro Herrera" <al******@dcc.u chile.cl> > On Mon, May 31, 2004 at 07:57:01AM +0200, Cyril VELTER wrote: > > From: "Doug McNaught" <do**@mcnaught. org> > > > "Cyril VELTER" <cy**********@m etadys.com> writes: > > > > > > > I'm trying to dump a database from a 7.1.3 server to a 7.4.2 one. > > > > It doesn't works because of difference in COPY format (unless I > > > > use -d which is VERY slow on a 16G database). > > > > > > Try using the 7.4.2 version of pg_dump to dump out the 7.1.3 > > > database. pg_dump is written to talk to multiple versions of the > > > server, and it's generally recommended to use the same version of > > > pg_dump as the server you're restoring into. > > > > That's what I already do, but the problem is in COPY TO format > > (which is handled by the backend ? right ?) > > What backend? 7.4-pg_dump will generate 7.4-backend's compatible > input, and the 7.1-backend does not interact at all --- save with > 7.4-pg_dump, which will make itself understood easily ... > > Lots of people (including me) use this procedure to upgrade rather > smoothly. What's your problem exactly?
Thanks for your response,
Perhaps I'm mistaken, but it seems that pg_dump (the 7.4 one) will send a COPY to STDOUT command to the 7.1 backend and blindly copy the output to the dump file.
Here's the kind of errors I get :
ERROR: literal carriage return found in data HINT: Use "\r" to represent carriage return. CONTEXT: COPY c244, line 221: "662188 1002 1002 2002-08-05 12:15:12.20+00 2002-08-05 12:15:12.20+00 274 0000 010001002020100 00000000..."
By looking more closely in the dump file, there is a CR (embedded in a text field) which is not encoded and confuse the restore
Maybe I'm misunderstandin g you but are you saying you already have the dump file? If not (of if you can connect to the 7.1.3 server with the 7.4.x dump program), you can, over tcp/ip, dump the data from 7.1.3 to a file and then reload that file into your 7.4.x cluster. I've upgraded 7.1.3 to 7.4 and 7.4.1 this way after I found out that the 7.4 pg_dump had problem reading the 7.1.3 file. This is way folks are saying its best to use the dump utils from your destination cluster (7.4.2 in your case) to move your data.
I've two postgres instances on two different machines (one is 7.1.3 under cygwin the other 7.4.2 under linux). I use the 7.4 pg_dump binary under linux
to dump the 7.1 database either to a file to inspect it or piped to the 7.4 psql connected to the 7.4 database.
I hope this is more clear.
I've worked out a solution which I have only tested on some tables. I use sed to replace embeded cr by the escaped form (\r). Will test this out with the complete database.
Perhaps it's because of cygwin ?
Thanks,
Cyril
Not so much cygwin but the fact that the newline characters are different maybe?
--
Keith C. Perry, MS E.E.
Director of Networks & Applications
VCSN, Inc. http://vcsn.com
_______________ _______________ ______
This email account is being host by:
VCSN, Inc : http://vcsn.com
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ravi Tallury |
last post by:
Hi
We are having issues with our application, certain portions of it stop
responding while the rest of the application is fine. I am attaching
the Java Core dump. If someone can let me know what the issue is.
Thanks
Ravi
|
by: Chris Stiles |
last post by:
Is there a human readable dump format for objects ? As opposed to pickling ?
It doesn't necessarily have to be XML - in fact i'd prefer if it wasn't ;) -
but ISTR an XML dump library.
--
regards, chris
|
by: Gregory Stone |
last post by:
I have a situation where I am doing a pg_dump from my database. I want to
make sure that noone is inserting into the tables being dump during the
dump. Does the MVCC architecture make it a moot point or do I need to
disable insert privileges during the dumping window? If so, is there an
easy way (i.e. one liner kind of thing) to do the temporary lock? I was
thinking I might need to write a stored procedure to change the write
privileges...
|
by: Matt |
last post by:
I want to know what is Hex Dump? I tried to search in google but
didn't get useful results. I know it is the hexademical representation
of something. But I don't know what is something? From C programmer's
perspective,
I always hear this term. But when do we need to use hex dump? what's
the importances of hex dump?
please advise. thanks!!
|
by: Microsoft News Server |
last post by:
Hi,
I am currently having a problem with random, intermittent lock ups in my
ASP.net application on our production server (99% CPU usage by 3 threads,
indefinately). I currently use IIS Debug Tools to do a memory dump of the
app when the lock up occurs, however the stack information is not very
useful.
I have just put a new build of our system onto production, and this build is
a "Debug" build as opposed to a "Release" build. I am...
| |
by: Andrei Ivanov |
last post by:
Hello,
I have a dump created with pg_dump ver 7.4.1 from a postgres 7.4 database,
with encoding SQL_ASCII.
I'm trying to import this dump in a 7.4.1 postgres database with encoding
UNICODE, but I'm getting some errors:
psql:dump.sql:1277: ERROR: invalid memory alloc request size
1073741824
psql:dump.sql:3490: ERROR: invalid byte sequence for encoding
|
by: Együd Csaba |
last post by:
Hi All,
I'd like to dump out my database using plain text format. Everything is ok,
but the bytea filds.
Restoring the dump file (using <<psql -f LO_TRY_INSERT_BYTEA.sql tmp7>>) it
sends an error message like
psql:LO_TRY_INSERT_BYTEA.sql:14: ERROR: Bad input string for type bytea
Trying dumping with copy commands it sends this error:
psql:LO_TRY_COPY_BYTEA.sql:13: lost synchronization with server, resetting
|
by: Soeren Gerlach |
last post by:
Hi,
some weeks ago I started to develop an application using Postgresql the
first time. I'm running 7.4.3 on a Linux box with a plain 2.6.7 kernel, the
storage is handled by 5 SATA disks, managed by a 3ware controller and using
a xfs filesystem. The DB server is a 3 Ghz P4 with 4 Gig of Ram, so the
machine is quite fast for most purposes I need it; the DB server is a pure
DB server, theres no application running on it.
I dump and...
|
by: Oleg |
last post by:
Dear All,
I have upgraded Postgresql from 7.3 to 7.4.
Starting pg brings error:
The database is in an older format that cannot be read by version 7.4 of
PostgreSQL
dpkg-upgrade postgresql fails
I tried postgresql-dump. While dumping it brings the following error:
FATAL: unsupported frontend protocol
However the dump file is generated.
|
by: dekel |
last post by:
I'm trying to find the way to create and debug dumpfile of dotnet
application.
Any recommendation of articles, tools for creating dump file + debug it
are appreciated.
The documentation I found recommends using mscordmp.exe
- The documentation does not specify file extension for the dump file
- The documentation does not specify how to decide what will be
included in the dump file
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |