pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_dumpall
7+ messages / 5 participants
[nested] [flat]
* pg_dumpall
@ 2003-02-19 19:16 Donald Fraser <demolish@cwgsy.net>
2003-02-19 19:20 ` Re: pg_dumpall Tom Lane <tgl@sss.pgh.pa.us>
2003-02-19 19:29 ` Re: pg_dumpall Stephan Szabo <sszabo@megazone23.bigpanda.com>
0 siblings, 2 replies; 7+ messages in thread
From: Donald Fraser @ 2003-02-19 19:16 UTC (permalink / raw)
To: pgsql-admin
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?
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.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: pg_dumpall
2003-02-19 19:16 pg_dumpall Donald Fraser <demolish@cwgsy.net>
@ 2003-02-19 19:20 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 7+ messages in thread
From: Tom Lane @ 2003-02-19 19:20 UTC (permalink / raw)
To: Donald Fraser <demolish@cwgsy.net>; +Cc: pgsql-admin
"Donald Fraser" <demolish@cwgsy.net> 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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: pg_dumpall
2003-02-19 19:16 pg_dumpall Donald Fraser <demolish@cwgsy.net>
@ 2003-02-19 19:29 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2003-02-20 10:46 ` Re: pg_dumpall Donald Fraser <demolish@cwgsy.net>
1 sibling, 1 reply; 7+ messages in thread
From: Stephan Szabo @ 2003-02-19 19:29 UTC (permalink / raw)
To: Donald Fraser <demolish@cwgsy.net>; +Cc: pgsql-admin
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.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: pg_dumpall
2003-02-19 19:16 pg_dumpall Donald Fraser <demolish@cwgsy.net>
2003-02-19 19:29 ` Re: pg_dumpall Stephan Szabo <sszabo@megazone23.bigpanda.com>
@ 2003-02-20 10:46 ` Donald Fraser <demolish@cwgsy.net>
2003-02-20 15:21 ` Re: pg_dumpall Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 7+ messages in thread
From: Donald Fraser @ 2003-02-20 10:46 UTC (permalink / raw)
To: pgsql-admin
> 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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: pg_dumpall
2003-02-19 19:16 pg_dumpall Donald Fraser <demolish@cwgsy.net>
2003-02-19 19:29 ` Re: pg_dumpall Stephan Szabo <sszabo@megazone23.bigpanda.com>
2003-02-20 10:46 ` Re: pg_dumpall Donald Fraser <demolish@cwgsy.net>
@ 2003-02-20 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 7+ messages in thread
From: Tom Lane @ 2003-02-20 15:21 UTC (permalink / raw)
To: Donald Fraser <demolish@cwgsy.net>; +Cc: pgsql-admin
"Donald Fraser" <demolish@cwgsy.net> 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
^ permalink raw reply [nested|flat] 7+ messages in thread
* pg_dumpall
@ 2003-03-14 06:43 Christian Frabel <ch.frabel@free.fr>
2003-03-14 17:57 ` Re: pg_dumpall Jean-Michel Chabanne <jeanmichel.chabanne@free.fr>
0 siblings, 1 reply; 7+ messages in thread
From: Christian Frabel @ 2003-03-14 06:43 UTC (permalink / raw)
To: Mathieu Arnold <mat@mat.cc>; Chad R. Larson <clarson@eldocomp.com>; Marc G. Fournier <scrappy@hub.org>; LN Cisneros <chulat@mail.com>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: pg_dumpall
2003-03-14 06:43 pg_dumpall Christian Frabel <ch.frabel@free.fr>
@ 2003-03-14 17:57 ` Jean-Michel Chabanne <jeanmichel.chabanne@free.fr>
0 siblings, 0 replies; 7+ messages in thread
From: Jean-Michel Chabanne @ 2003-03-14 17:57 UTC (permalink / raw)
To: Christian Frabel <ch.frabel@free.fr>; +Cc: Mathieu Arnold <mat@mat.cc>; Chad R. Larson <clarson@eldocomp.com>; Marc G. Fournier <scrappy@hub.org>; LN Cisneros <chulat@mail.com>; pgsql-admin
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
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2003-03-14 17:57 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-19 19:16 pg_dumpall Donald Fraser <demolish@cwgsy.net>
2003-02-19 19:20 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-02-19 19:29 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2003-02-20 10:46 ` Donald Fraser <demolish@cwgsy.net>
2003-02-20 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-03-14 06:43 pg_dumpall Christian Frabel <ch.frabel@free.fr>
2003-03-14 17:57 ` Jean-Michel Chabanne <jeanmichel.chabanne@free.fr>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox