X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9EED3DBB3B for ; Fri, 18 Nov 2005 20:29:56 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12349-07 for ; Sat, 19 Nov 2005 00:29:58 +0000 (GMT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.202]) by svr1.postgresql.org (Postfix) with ESMTP id D4004DBB39 for ; Fri, 18 Nov 2005 20:29:53 -0400 (AST) Received: by nproxy.gmail.com with SMTP id o60so11592nfa for ; Fri, 18 Nov 2005 16:29:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=A6DKtHUW37NCR6U6PLYtiJQ6834tVB9Xdi0vYROjVAqRD1TJHcoaAzSsOujhVqrJWqpv8fz8XTDtXD3bje7zE1vheFS7yofwWH3k+cH+gpV5UpMGv/G/84khZQCgBVfKUgXRyqGuw4sTvnrLyz6We/hJ1erNqaY0AYMANebD+Fg= Received: by 10.49.41.2 with SMTP id t2mr38062nfj; Fri, 18 Nov 2005 16:29:54 -0800 (PST) Received: by 10.48.30.8 with HTTP; Fri, 18 Nov 2005 16:29:54 -0800 (PST) Message-ID: Date: Sat, 19 Nov 2005 00:29:54 +0000 From: Guido Barosio To: Colton A Smith Subject: Re: COPY and partitioning Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12262_8328966.1132360194464" References: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.001 required=5 tests=[HTML_MESSAGE=0.001] X-Spam-Score: 0.001 X-Spam-Level: X-Archive-Number: 200511/251 X-Sequence-Number: 19624 ------=_Part_12262_8328966.1132360194464 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thinking about dumping the schema, rewriting that structure with your partitioning needs, and after copy the data. Why not? Just 2 cents, never done it. to dump a schema: pg_dump -s dbname > dbname.schema Then just restore the data, it should work I guess. Best regards, Guido On 11/17/05, Colton A Smith wrote: > > Hi > > I understand v8.1 implements table partitioning. Very exciting! > > I have a big table (30 G) that is a real headache. I'd like to > partition it. My plan is the following: (1) use pg_dump -t to > dump the data; (2) create a partitioning schema with check constraints; > and (3) repopulate using the COPY utility. > > My question: does the COPY utility consult check constraints > before populating tables? > > Thanks as always. > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend > -- "Adopting the position that you are smarter than an automatic optimization algorithm is generally a good way to achieve less performance, not more" - Tom Lane. ------=_Part_12262_8328966.1132360194464 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Thinking about dumping the schema, rewriting that structure with your = partitioning needs, and after copy the data.
 
Why not?
 
Just 2 cents, never done it.
 
to dump a schema:
pg_dump -s dbname > dbname.schema 
 
Then just restore the data, it should work I guess.
 
Best regards,
Guido

 
On 11/17/05, Colton A Smith <smith@cs.utk.ed= u> wrote:
Hi

  I understa= nd v8.1 implements table partitioning.  Very exciting!

&nb= sp; I have a big table (30 G) that is a real headache.  I'd = like to
partition it.  My plan is the following: (1) use pg_dump -t t= o
dump the data; (2) create a partitioning schema with check constraints= ;
and (3) repopulate using the COPY utility.

  My quest= ion: does the COPY utility consult check constraints
before populating tables?

  Thanks as always.

-= --------------------------(end of broadcast)---------------------------
= TIP 6: explain analyze is your friend



--
"Adopting the position that you are smarter than an automaticoptimization algorithm is generally a good way to achieve less
perform= ance, not more" - Tom Lane.=20 ------=_Part_12262_8328966.1132360194464--