public inbox for [email protected]  
help / color / mirror / Atom feed
restore overwrite?
2+ messages / 2 participants
[nested] [flat]

* restore overwrite?
@ 2022-09-07 07:50 Anne Wainwright <[email protected]>
  2022-09-07 16:31 ` Re: restore overwrite? David G. Johnston <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Anne Wainwright @ 2022-09-07 07:50 UTC (permalink / raw)
  To: pgsql-novice

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: restore overwrite?
  2022-09-07 07:50 restore overwrite? Anne Wainwright <[email protected]>
@ 2022-09-07 16:31 ` David G. Johnston <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2022-09-07 16:31 UTC (permalink / raw)
  To: pgsql-novice

On Wednesday, September 7, 2022, Anne Wainwright <[email protected]>
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.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-09-07 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 07:50 restore overwrite? Anne Wainwright <[email protected]>
2022-09-07 16:31 ` David G. Johnston <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox