Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 930579FB2D2 for ; Mon, 23 Oct 2006 17:35:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 06622-08 for ; Mon, 23 Oct 2006 17:35:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from gmp-ea-fw-1.sun.com (gmp-ea-fw-1.sun.com [192.18.1.36]) by postgresql.org (Postfix) with ESMTP id AEAA79FB229 for ; Mon, 23 Oct 2006 17:35:20 -0300 (ADT) Received: from d1-emea-09.sun.com ([192.18.2.119]) by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id k9NKZJjA025195 for ; Mon, 23 Oct 2006 21:35:19 +0100 (BST) Received: from conversion-daemon.d1-emea-09.sun.com by d1-emea-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0J7L00I01VSD3Y00@d1-emea-09.sun.com> (original mail from Zdenek.Kotala@Sun.COM) for pgsql-hackers@postgresql.org; Mon, 23 Oct 2006 21:35:19 +0100 (BST) Received: from [129.150.120.213] by d1-emea-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0J7L007OBVURD3N0@d1-emea-09.sun.com>; Mon, 23 Oct 2006 21:35:19 +0100 (BST) Date: Mon, 23 Oct 2006 22:31:37 +0200 From: Zdenek Kotala Subject: Re: COPY does not work with regproc and aclitem In-reply-to: <28143.1161634972@sss.pgh.pa.us> To: Tom Lane Cc: Andrew Dunstan , pgsql-hackers@postgresql.org Message-id: <453D26A9.70702@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <453D1B73.2050906@sun.com> <453D1EBF.5070506@dunslane.net> <453D201E.3070202@sun.com> <28143.1161634972@sss.pgh.pa.us> User-Agent: Mail/News 1.5 (X11/20051211) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.129 tagged_above=0 required=5 tests=AWL, SPF_HELO_SOFTFAIL, SPF_SOFTFAIL, UNPARSEABLE_RELAY X-Spam-Level: ** X-Archive-Number: 200610/1243 X-Sequence-Number: 93140 Tom Lane wrote: > Zdenek Kotala writes: >> I'm playing with catalog upgrade. The very basic idea of my experiment >> is export data from catalog and import it back to the new >> initialized/fresh catalog. > > That is never going to work, at least not for any interesting catalogs. > A system with a "fresh" (I assume you mean empty) pg_proc, for instance, > is non functional. No empty, fresh initialized by initdb. I want to copy only "user data" which is not created during boostrap. > > A much bigger problem, if you're thinking of this as a component step > of pg_upgrade, is that you can't use anything at the COPY level of > detail because it will fail if the new version wants a different catalog > layout --- for instance, if someone's added a column to the catalog. Yes, I know about it. It is not problem, I want to prepare "shadow" catalog with new structure on old database in separate schema and adjust data in these tables. After it I want to make final COPY - data will be copied with correct structure. > The right way to implement pg_upgrade is to transfer the catalog data > at the SQL-command level of abstraction, ie, "pg_dump -s" and reload. I'm not sure if it is important, but I think that preserve OID is important and SQL level does not allow set OID. Zdenek