From demolish@cwgsy.net Wed Feb 19 19:12:20 2003 X-Original-To: pgsql-admin@postgresql.org Received: from gsy_sbs_1.cisx.com (unknown [213.133.202.58]) by postgresql.org (Postfix) with ESMTP id 5C14E47592C for ; Wed, 19 Feb 2003 14:12:20 -0500 (EST) Received: from DEMOLITION ([192.168.100.22]) by gsy_sbs_1.cisx.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id FHCZWBQQ; Wed, 19 Feb 2003 19:05:10 -0000 Message-ID: <005401c2d84b$660fbf10$1664a8c0@DEMOLITION> From: "Donald Fraser" To: "[ADMIN]" Subject: pg_dumpall Date: Wed, 19 Feb 2003 19:16:21 -0000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0051_01C2D84B.62E29B00" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200302/317 X-Sequence-Number: 7515 This is a multi-part message in MIME format. ------=_NextPart_000_0051_01C2D84B.62E29B00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable PostgreSQL 7.3.1 on i686-pc-linux-gnu, compiled by GCC 2.96 I issue the following command: CREATE DATABASE "CISX" WITH OWNER =3D postgres TEMPLATE =3D template1 ENCOD= ING =3D 'SQL_ASCII'; When I do a backup from the database using pg_dumpall (with no command line= options) it creates the following: CREATE DATABASE "CISX" WITH OWNER =3D postgres TEMPLATE =3D template0 ENCOD= ING =3D 'SQL_ASCII'; I don't know whether this is a bug or not as I can't find any hard document= ation to say otherwise? There seems to be some kind of indication that this is the case for pg_dump= but it's not clear. Can someone clarify this, am I missing something obvious here? If this is the case will there be a possible fix for this in the future? Regards Donald Fraser. ------=_NextPart_000_0051_01C2D84B.62E29B00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
PostgreSQL 7.3.1 on i686-pc-linux-gnu, com= piled by=20 GCC 2.96
 
I issue the following command:
CREATE DATABASE "CISX" WITH OWNER =3D postgres TEMPLATE =3D template1 = ENCODING=20 =3D 'SQL_ASCII';
 
When I do a backup from the database using pg_dumpall (with no command= line=20 options) it creates the following:
CREATE DATABASE "CISX" WITH OWNER =3D postgres TEMPLATE =3D template0 = ENCODING=20 =3D 'SQL_ASCII';
 
I don't know whether this is a bug or not as I can't find any hard=20 documentation to say otherwise?
There seems to be some kind of indication that this is the case for pg= _dump=20 but it's not clear.
Can someone clarify this, am I missing something obvious here?
If this is the case will there be a possible fix for this in the=20 future?
 
Regards Donald Fraser.
 
------=_NextPart_000_0051_01C2D84B.62E29B00-- From tgl@sss.pgh.pa.us Wed Feb 19 19:59:04 2003 X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EC904475E22 for ; Wed, 19 Feb 2003 14:59:04 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 25037-04 for ; Wed, 19 Feb 2003 14:58:54 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id A757B475DC8 for ; Wed, 19 Feb 2003 14:20:21 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h1JJKK5u013509; Wed, 19 Feb 2003 14:20:20 -0500 (EST) To: "Donald Fraser" Cc: "[ADMIN]" Subject: Re: pg_dumpall In-reply-to: <005401c2d84b$660fbf10$1664a8c0@DEMOLITION> References: <005401c2d84b$660fbf10$1664a8c0@DEMOLITION> Comments: In-reply-to "Donald Fraser" message dated "Wed, 19 Feb 2003 19:16:21 +0000" Date: Wed, 19 Feb 2003 14:20:19 -0500 Message-ID: <13508.1045682419@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/320 X-Sequence-Number: 7518 "Donald Fraser" writes: > When I do a backup from the database using pg_dumpall (with no command line= > options) it creates the following: > CREATE DATABASE "CISX" WITH OWNER =3D postgres TEMPLATE =3D template0 ENCOD= > ING =3D 'SQL_ASCII'; > I don't know whether this is a bug or not It is not; the use of template0 is intentional. (Otherwise, whatever local additions may exist in template1 would get duplicated.) regards, tom lane From sszabo@megazone23.bigpanda.com Wed Feb 19 19:29:51 2003 X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 07FE0475DDA for ; Wed, 19 Feb 2003 14:29:51 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 16283-03 for ; Wed, 19 Feb 2003 14:29:40 -0500 (EST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 5C95E4758C9 for ; Wed, 19 Feb 2003 14:29:40 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 92181D622; Wed, 19 Feb 2003 11:29:40 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 87C3C5C03; Wed, 19 Feb 2003 11:29:40 -0800 (PST) Date: Wed, 19 Feb 2003 11:29:40 -0800 (PST) From: Stephan Szabo To: Donald Fraser Cc: "[ADMIN]" Subject: Re: pg_dumpall In-Reply-To: <005401c2d84b$660fbf10$1664a8c0@DEMOLITION> Message-ID: <20030219112211.K36237-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/319 X-Sequence-Number: 7517 On Wed, 19 Feb 2003, Donald Fraser wrote: > PostgreSQL 7.3.1 on i686-pc-linux-gnu, compiled by GCC 2.96 > > I issue the following command: > CREATE DATABASE "CISX" WITH OWNER = postgres TEMPLATE = template1 ENCODING = 'SQL_ASCII'; > > When I do a backup from the database using pg_dumpall (with no command line options) it creates the following: > CREATE DATABASE "CISX" WITH OWNER = postgres TEMPLATE = template0 ENCODING = 'SQL_ASCII'; > > I don't know whether this is a bug or not as I can't find any hard documentation to say otherwise? I'd guess not, because the objects you copied from template1 when making the database are part of the dumpall output. If you made it from template1 after the backup you'd get anything that was in the new template1 plus all of the old objects. From demolish@cwgsy.net Thu Feb 20 10:43:41 2003 X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4F31E474E61 for ; Thu, 20 Feb 2003 05:43:41 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 39040-06 for ; Thu, 20 Feb 2003 05:43:30 -0500 (EST) Received: from gsy_sbs_1.cisx.com (unknown [213.133.202.58]) by postgresql.org (Postfix) with ESMTP id 28532475ADE for ; Thu, 20 Feb 2003 05:42:05 -0500 (EST) Received: from DEMOLITION ([192.168.100.22]) by gsy_sbs_1.cisx.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id FJ1J93YC; Thu, 20 Feb 2003 10:34:55 -0000 Message-ID: <003401c2d8cd$48fcaf50$1664a8c0@DEMOLITION> From: "Donald Fraser" To: "[ADMIN]" References: <20030219112211.K36237-100000@megazone23.bigpanda.com> Subject: Re: pg_dumpall Date: Thu, 20 Feb 2003 10:46:03 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/328 X-Sequence-Number: 7526 > On Wed, 19 Feb 2003, Donald Fraser wrote: > > > PostgreSQL 7.3.1 on i686-pc-linux-gnu, compiled by GCC 2.96 > > > > I issue the following command: > > CREATE DATABASE "CISX" WITH OWNER = postgres TEMPLATE = template1 ENCODING = 'SQL_ASCII'; > > > > When I do a backup from the database using pg_dumpall (with no command line options) it creates the following: > > CREATE DATABASE "CISX" WITH OWNER = postgres TEMPLATE = template0 ENCODING = 'SQL_ASCII'; > > > > I don't know whether this is a bug or not as I can't find any hard documentation to say otherwise? > > I'd guess not, because the objects you copied from template1 when making > the database are part of the dumpall output. If you made it from > template1 after the backup you'd get anything that was in the new > template1 plus all of the old objects. > > Ok I understand now... I haven't been using template1 with non-pg_catalog objects. My question now would be, is there an easy way to place your own objects into pg_catalog for template0? (In advance of why... it is much easier to apply any upgrades / patches to my own customisations when they are not backed up into the standard backup - otherwise you have to manually edit the backup file which is much harder to do than apply a patch to the template.) Regards Donald From tgl@sss.pgh.pa.us Thu Feb 20 15:21:31 2003 X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 99F53474E61 for ; Thu, 20 Feb 2003 10:21:31 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 12924-03 for ; Thu, 20 Feb 2003 10:21:21 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id C65A2474E4F for ; Thu, 20 Feb 2003 10:21:20 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h1KFLN5u022214; Thu, 20 Feb 2003 10:21:23 -0500 (EST) To: "Donald Fraser" Cc: "[ADMIN]" Subject: Re: pg_dumpall In-reply-to: <003401c2d8cd$48fcaf50$1664a8c0@DEMOLITION> References: <20030219112211.K36237-100000@megazone23.bigpanda.com> <003401c2d8cd$48fcaf50$1664a8c0@DEMOLITION> Comments: In-reply-to "Donald Fraser" message dated "Thu, 20 Feb 2003 10:46:03 +0000" Date: Thu, 20 Feb 2003 10:21:22 -0500 Message-ID: <22213.1045754482@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/332 X-Sequence-Number: 7530 "Donald Fraser" writes: > My question now would be, is there an easy way to place your own objects > into pg_catalog for template0? Changing template0 is exactly what you are NOT supposed to do, as it breaks what pg_dump is trying to accomplish. However, you could probably just edit the dump file to replace the references to template0 with template1. When you reload the dump, you will get lots of errors as the customized objects coming in from the dump collide with the ones copied from template1 --- but that's what you want. regards, tom lane From ch.frabel@free.fr Fri Mar 14 06:43:29 2003 X-Original-To: pgsql-admin@postgresql.org Received: from kraid.nerim.net (smtp-102.nerim.net [62.4.16.102]) by postgresql.org (Postfix) with ESMTP id 9B2B5475A71 for ; Fri, 14 Mar 2003 01:43:29 -0500 (EST) Received: from ujt (genibrede.net2.nerim.net [62.4.19.232]) by kraid.nerim.net (Postfix) with SMTP id 1992E40E2D; Fri, 14 Mar 2003 07:43:26 +0100 (CET) Message-ID: <000f01c2e9f5$04ceb470$2e02a8c0@ujt> From: "Christian Frabel" To: "Mathieu Arnold" , "Chad R. Larson" , "Marc G. Fournier" , "LN Cisneros" Cc: References: <5.1.0.14.2.20030313080301.01ebea78@mail.earthlink.net> <20030310205101.65721.qmail@web41607.mail.yahoo.com> <20030310205101.65721.qmail@web41607.mail.yahoo.com> <5.1.0.14.2.20030313080301.01ebea78@mail.earthlink.net> <4.2.2.20030313105131.013f0f28@imap.ecinet.com> <7831406.1047595747@sauron.in.mat.cc> Subject: pg_dumpall Date: Fri, 14 Mar 2003 07:43:27 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Archive-Number: 200303/213 X-Sequence-Number: 7853 After a pg_dumpall > alldata how can I to restore? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.445 / Virus Database: 250 - Release Date: 21/01/2003 From jeanmichel.chabanne@free.fr Fri Mar 14 17:53:17 2003 X-Original-To: pgsql-admin@postgresql.org Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by postgresql.org (Postfix) with ESMTP id D519D476353 for ; Fri, 14 Mar 2003 12:53:17 -0500 (EST) Received: from free.fr (lns-p19-19-81-56-83-176.adsl.proxad.net [81.56.83.176]) by postfix4-1.free.fr (Postfix) with ESMTP id 3F4A4189E0; Fri, 14 Mar 2003 18:53:21 +0100 (CET) Message-ID: <3E721814.1080101@free.fr> Date: Fri, 14 Mar 2003 18:57:40 +0100 From: Jean-Michel Chabanne User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: fr, en-us, en MIME-Version: 1.0 To: Christian Frabel Cc: Mathieu Arnold , "Chad R. Larson" , "Marc G. Fournier" , LN Cisneros , pgsql-admin@postgresql.org Subject: Re: pg_dumpall References: <5.1.0.14.2.20030313080301.01ebea78@mail.earthlink.net> <20030310205101.65721.qmail@web41607.mail.yahoo.com> <20030310205101.65721.qmail@web41607.mail.yahoo.com> <5.1.0.14.2.20030313080301.01ebea78@mail.earthlink.net> <4.2.2.20030313105131.013f0f28@imap.ecinet.com> <7831406.1047595747@sauron.in.mat.cc> <000f01c2e9f5$04ceb470$2e02a8c0@ujt> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/231 X-Sequence-Number: 7871 Christian Frabel wrote: >After a pg_dumpall > alldata how can I to restore? > > > >--- >Outgoing mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.445 / Virus Database: 250 - Release Date: 21/01/2003 > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate >subscribe-nomail command to majordomo@postgresql.org so that your >message can get through to the mailing list cleanly > > > > psql -f alldata template1 postgres -- Jean-Michel Chabanne 77450 MONTRY (FRANCE) 48" 54' N - 2" 49' E Powered by Linux