From: | Vick Khera <vivek(at)khera(dot)org> |
---|---|
To: | Jean-Francois Prieur <jfprieur(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Table ordering in pg_dump |
Date: | 2016-06-17 13:39:26 |
Message-ID: | CALd+dccgwMFsQkOyuVdkkKet_z+AHYYCO-jF5mkGEPWYq-wZ0w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jun 16, 2016 at 10:32 AM, Jean-Francois Prieur <jfprieur(at)gmail(dot)com>
wrote:
> 1) Is there any way to tell pg_dump the order in which the tables should
> be dumped?
> 2) Am I correct to assume that if I use the --disable-trigger option in
> pg_restore it should mitigate the problem? This only works on a data-only
> dump per the documentation, so if I am doing the initial copy of the
> database to the new server, will data-only give me everything I need or is
> it only good for incremental updates to an already running copy of a
> database?
> 3) Alternatively, is there a psql command that I could run on the new
> server to disable all triggers/constraint checking, run the restore and
> then re-enable them?
> 4) Since we are in a lab environment, I can shut down the server and copy
> the folder containing the database to the new server. Is this kosher? I
> could then try the data-only dump and restore in 2) to keep them updated.
>
> Sorry for the noobish questions, thank you for your time. Coming from
> mysql so the concepts are familiar but the execution different!
>
Firstly, what version of postgres are you using? What format are you
dumping the file to?
When you dump using the compressed format, the pg_restore process will not
have an FK's until such time that the data is entirely loaded.
From | Date | Subject | |
---|---|---|---|
Next Message | Tobia Conforto | 2016-06-17 13:46:23 | Creating or modifying a tsquery from PL/pgSQL |
Previous Message | Merlin Moncure | 2016-06-17 13:31:51 | Re: random huge delay when recreate a VIEW or FUNCTION |