Re: restore overwrite?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: restore overwrite?
Date: 2022-09-07 16:31:11
Message-ID: CAKFQuwZkmTAv-7_3cof5phaMqhfdTnWHVs+v-LssN=iF6O1QOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wednesday, September 7, 2022, Anne Wainwright <anotheranne(at)fables(dot)co(dot)za>
wrote:

> Hi,
>
> I want to do a restore to write over the top of existing data.
>
> The unique key prevents this. Should I rather TRUNCATE the tables
> concerned before the restore? That is a bit scary if the restore does
> not work. Is there a better way.
>
> (This data on v.8.4.4 which is being moved to latest version 14).
>
> Thanks for answer in advance
>
> Anne
>
>
If you cannot just do a simple restore into an empty v14 database you are
probably better off not thinking of this as a restore operation but instead
an ETL operation and write ETL code to extract data from the v8 database,
do any necessary transforms (possibly within the v14 database but within a
staging table), then merge the transformed data into the real v14 tables.

David J.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Onni Hakala 2022-10-03 17:38:41 How can I create a feature request for QUALIFY clause into PostgreSQL?
Previous Message Anne Wainwright 2022-09-07 07:50:18 restore overwrite?