Re: Pg_restore and dump -- General question

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Howard Cole <howardnews(at)selestial(dot)com>
Cc: salah jubeh <s_jubeh(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Pg_restore and dump -- General question
Date: 2011-04-04 11:44:28
Message-ID: BANLkTi=rNC_K_ON_jU5d4VGowibpPRrXzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Apr 4, 2011 at 5:40 AM, Howard Cole <howardnews(at)selestial(dot)com> wrote:
> On 04/04/2011 11:47 AM, salah jubeh wrote:
>
> What will happen if
>
> 1. dropped table a
> 2. insert data on b and the other relations
> 3. restore table a and it's dependency (table b).
>
> Simple advice would be to create a script on an offline system for testing -
> when you are happy with the results - do it on the online system - after
> making a backup of course! Anything else would be suicidal.

Agreed. AND on the production system first take a backup and THEN run
the drop cascade inside a transaction in case it does crazy things you
didn't foresee.

begin;
drop object yada cascade;

then rollback if things get too scary.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raghavendra 2011-04-04 13:07:14 Re: How to get index columns/dir/ord informations?
Previous Message Howard Cole 2011-04-04 11:40:37 Re: Pg_restore and dump -- General question