From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_dump additional options for performance |
Date: | 2008-03-23 00:32:20 |
Message-ID: | 200803230032.m2N0WKh19121@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Added to TODO:
o Allow pre/data/post files when dumping a single object, for
performance reasons
http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php
---------------------------------------------------------------------------
Simon Riggs wrote:
> pg_dump allows you to specify -s --schema-only, or -a --data-only.
>
> The -s option creates the table, as well as creating constraints and
> indexes. These objects need to be dropped prior to loading, if we are to
> follow the performance recommendations in the docs. But the only way to
> do that is to manually edit the script to produce a cut down script.
>
> So it would be good if we could dump objects in 3 groups
> 1. all commands required to re-create table
> 2. data
> 3. all commands required to complete table after data load
>
> My proposal is to provide two additional modes:
> --schema-pre-load corresponding to (1) above
> --schema-post-load corresponding to (3) above
>
> This would then allow this sequence of commands
>
> pg_dump --schema-pre-load
> pg_dump --data-only
> pg_dump --schema-post-load
>
> to be logically equivalent, but faster than
>
> pg_dump --schema-only
> pg_dump --data-only
>
> both forms of which are equivalent to just
>
> pg_dump
>
>
> [Assuming data isn't changing between invocations...]
>
> --
> Simon Riggs
> 2ndQuadrant http://www.2ndQuadrant.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-03-23 00:37:06 | Re: Page-at-a-time Locking Considerations |
Previous Message | Tom Lane | 2008-03-23 00:27:03 | Re: [HACKERS] quote_literal with NULL |