Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 12:25 AM
Christophe Musielak
Guest
 
Posts: n/a
Default 7.2.3-7.4.2 migration

Hello,

First let me introduce myself as i'm posting for the first time.

I'm a project manager working for a french e-crm company, that is
dealing with packaged email managing solutions, both inbound and
outbound.

Our technical solutions relies on perl, c++, corba, apache and Postgres
7.2.3.

We were waiting for 7.4.2 to upgrade. As it is out now, i have some
questions to ask.

The point is that we must upgrade our clients database, with loads of
data in.

First, is it possible to upgrade directly from 7.2.3 --> 7.4.2 : ie dump
the 7.2.3 datas, upgrade to 7.4.2, then restore the 7.2.3 datas?

or shall we do 7.3 upgrade, restore datas, dump, then 7.4 db upgrade,
restore datas?

I would then appreciate if anyone can report a similar experience,
problems faced and so on..

Thanks a lot by advance

Christophe Musielak

  #2  
Old November 23rd, 2005, 12:25 AM
Richard Huxton
Guest
 
Posts: n/a
Default Re: 7.2.3-7.4.2 migration

On Thursday 01 April 2004 12:12, Christophe Musielak wrote:[color=blue]
>
> I'm a project manager working for a french e-crm company, that is
> dealing with packaged email managing solutions, both inbound and
> outbound.[/color]

Hello Cristophe
[color=blue]
> First, is it possible to upgrade directly from 7.2.3 --> 7.4.2 : ie dump
> the 7.2.3 datas, upgrade to 7.4.2, then restore the 7.2.3 datas?
> or shall we do 7.3 upgrade, restore datas, dump, then 7.4 db upgrade,
> restore datas?[/color]

I don't think you'd gain anything by doing the upgrade in two steps. The main
thing you'll notice is the introduction of schemas. Check for the use of
'now' as a default value too. Probably worth spending an hour or two
reviewing the release notes in the manual to look for changes.
[color=blue]
> I would then appreciate if anyone can report a similar experience,
> problems faced and so on..[/color]

I tend to do a schema-only followed by a data-only restore. The main problems
I have are to do with dependencies between objects (function F relies on
table T existing). I use the -l/-L flags on pg_restore to let me manually
reorder the few items with problems.

Once the schema is transferred, I restore the data using the
--use-set-session-authorization and --disable-triggers flags.

Where possible, I try to script any changes I have to make - especially
worthwhile in your case I'd have thought.

HTH
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

  #3  
Old November 23rd, 2005, 12:25 AM
Alvaro Herrera
Guest
 
Posts: n/a
Default Re: 7.2.3-7.4.2 migration

On Thu, Apr 01, 2004 at 01:01:21PM +0100, Richard Huxton wrote:[color=blue]
> On Thursday 01 April 2004 12:12, Christophe Musielak wrote:[/color]
[color=blue][color=green]
> > I would then appreciate if anyone can report a similar experience,
> > problems faced and so on..[/color]
>
> I tend to do a schema-only followed by a data-only restore. The main problems
> I have are to do with dependencies between objects (function F relies on
> table T existing). I use the -l/-L flags on pg_restore to let me manually
> reorder the few items with problems.[/color]

CVS tip's pg_dump orders objects more appropiately than before - AFAIU
the dump is always correct. If you have this kind of problem, the new
code could save you some work. If you use it, make sure you use the
"-X disable-dollar-quoting" switch too, because otherwise the dump won't
be loadable on released versions.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"I suspect most samba developers are already technically insane...
Of course, since many of them are Australians, you can't tell." (L. Torvalds)

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

  #4  
Old November 23rd, 2005, 12:25 AM
Tom Lane
Guest
 
Posts: n/a
Default Re: 7.2.3-7.4.2 migration

Richard Huxton <dev@archonet.com> writes:[color=blue]
> On Thursday 01 April 2004 12:12, Christophe Musielak wrote:[color=green]
>> First, is it possible to upgrade directly from 7.2.3 --> 7.4.2 : ie dump
>> the 7.2.3 datas, upgrade to 7.4.2, then restore the 7.2.3 datas?
>> or shall we do 7.3 upgrade, restore datas, dump, then 7.4 db upgrade,
>> restore datas?[/color][/color]
[color=blue]
> I don't think you'd gain anything by doing the upgrade in two steps.[/color]

I agree; that just doubles the work. One note: you'd be well advised to
execute the dump using 7.4's pg_dump rather than 7.2's. Later pg_dumps
often fix problems in earlier ones.
[color=blue]
> I tend to do a schema-only followed by a data-only restore.[/color]

That will slow things down a bit because indexes and foreign keys will
be built/checked incrementally rather than in one go. What I definitely
*would* recommend is trying a schema-only dump first to check for
problems. If that loads, drop it again and go for a full dump. If not,
you can work out a solution without pushing so much data around ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

  #5  
Old November 23rd, 2005, 12:25 AM
Christophe Musielak
Guest
 
Posts: n/a
Default Re: 7.2.3-7.4.2 migration

Thanks for your advices.

Christophe

Le jeu 01/04/2004 à 17:28, Tom Lane a écrit :
[color=blue]
> Richard Huxton <dev@archonet.com> writes:[color=green]
> > On Thursday 01 April 2004 12:12, Christophe Musielak wrote:[color=darkred]
> >> First, is it possible to upgrade directly from 7.2.3 --> 7.4.2 : ie dump
> >> the 7.2.3 datas, upgrade to 7.4.2, then restore the 7.2.3 datas?
> >> or shall we do 7.3 upgrade, restore datas, dump, then 7.4 db upgrade,
> >> restore datas?[/color][/color]
>[color=green]
> > I don't think you'd gain anything by doing the upgrade in two steps.[/color]
>
> I agree; that just doubles the work. One note: you'd be well advised to
> execute the dump using 7.4's pg_dump rather than 7.2's. Later pg_dumps
> often fix problems in earlier ones.
>[color=green]
> > I tend to do a schema-only followed by a data-only restore.[/color]
>
> That will slow things down a bit because indexes and foreign keys will
> be built/checked incrementally rather than in one go. What I definitely
> *would* recommend is trying a schema-only dump first to check for
> problems. If that loads, drop it again and go for a full dump. If not,
> you can work out a solution without pushing so much data around ...
>
> regards, tom lane[/color]

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles