Hello

There is a use case from GoodData's engineer

---
We have many user projects, each project has his own database with
granted permissions.
We use pg_dump with option "--clean" which extends SQL dump with syntax like:
"DROP INDEX tab1_idx1;"
"DROP TABLE tab1;"

When we load such dump into database we get a lot of error messages saying:
"INDEX tab1_idx1 doesn't exists;"
"TABLE tab1 doesn't exists;"

We need "--clean" parameter, because we often need to load dump into
database which is not empty.
On the other hand, we want to get rid of ERROR messages in case some
of tables are missing.

Typically we are need to solve one of following situations:

1, dump user project, restore the data in new project.
Each project, even empty one contains at least table "const".
During load of SQL dump, const table from dump needs to overwrite the
one in database.

2, restore the data in project after fail of previous restoration
E.g. connection lost during restoration, no disc space left on device, ...

3, restore the data in project from backup
For some reason, data in the project are messed up and they need to be
overwritten from backup


Vlada
VladimĂ­r Vacula  (GoodData)

---

Regards

Pavel Stehule

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to