Re: pg_dump performance lossage for primary keys - Mailing list pgsql-hackers

From Philip Warner
Subject Re: pg_dump performance lossage for primary keys
Date
Msg-id 3.0.5.32.20010404051832.00ae9690@mail.rhyme.com.au
Whole thread Raw
In response to pg_dump performance lossage for primary keys  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 14:33 3/04/01 -0400, Tom Lane wrote:
>I notice that pg_dump now dumps primary-key indexes in the style
>
>CREATE TABLE ... (
>    "dest_index" integer DEFAULT ...,
>    Constraint "dest_addresses_pkey" Primary Key ("dest_index")
>);
>
>Isn't this pretty darn stupid?

Yep.

>Previously, we created indexes after
>loading the data.  We're going to take a huge performance hit to do it
>this way.

My 7.0 dumps PK in table definitions as well, AFAICT (but it may have been
patched)  - can you check yours? 

The first time PK-in-table was implemented was in rev 1.124/5, but it may
have been taken out afterwards.

We really need ALTER TABLE ADD CONSTRAINT for PK.



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump performance lossage for primary keys
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: pg_dump performance lossage for primary keys