From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Juan Hernández <dejesusog(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: I have an exporting need... |
Date: | 2024-05-14 00:13:11 |
Message-ID: | CAApHDvoESC9CeFEY6ycRrJQsNBK8sqzPLA6mCY+XN=o=FCDjEg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 14 May 2024 at 06:18, Juan Hernández <dejesusog(at)gmail(dot)com> wrote:
> Do you consider useful to add a parameter (for example, --separatetables) so when used the exporting file process can create a different tablename.sql file for each table in database automatically?
>
> Example...
>
> PGHOST="/tmp" PGPASSWORD="mydbpass" pg_dump -U dbusername --separatetables -Fp --inserts dbname > "/route/dbname.sql"
>
> And if this database has tables table1...table10, then 10 files are created...
pg_dump has code to figure out the dependency of objects in the
database so that the dump file produced can be restored. If one file
was output per table, how would you know in which order to restore
them? For example, you have a table with a FOREIGN KEY to reference
some other table, you need to restore the referenced table first.
That's true for both restoring the schema and restoring the data.
David
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-05-14 00:18:43 | Re: GUC-ify walsender MAX_SEND_SIZE constant |
Previous Message | Yusuke Egashira (Fujitsu) | 2024-05-14 00:12:42 | RE: Resetting synchronous_standby_names can wait for CHECKPOINT to finish |