pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow can I recreate the template0 database?
3+ messages / 3 participants
[nested] [flat]
* How can I recreate the template0 database?
@ 2005-03-09 07:32 Eduardo Mambrilla Martínez <emambr@tid.es>
2005-03-14 15:59 ` Re: How can I recreate the template0 database? Scott Marlowe <smarlowe@g2switchworks.com>
0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Mambrilla Martínez @ 2005-03-09 07:32 UTC (permalink / raw)
To: pgsql-admin
I made a mistake, I droped the template0 database...
How can I recreate it?
Thanks
Attachments:
EDUARDO MAMBRILLA MARTINEZ.vcf (text/x-vcard, 635B) download
BEGIN:VCARD
VERSION:2.1
N:MAMBRILLA MARTINEZ;EDUARDO
FN:EDUARDO MAMBRILLA MARTINEZ
ORG:Telefónica Investigación y Desarrollo
TITLE:<Img Src="Http://Www.Emambrilla.Com/Telefonica.Gif"><Br>
TEL;WORK;VOICE:+34 983357606
TEL;HOME;VOICE:+34 983245403
TEL;CELL;VOICE:+34 630823266
TEL;WORK;FAX:+34 983367664
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Parque Tecnol=F3gico de Boecillo=0D=0AParcelas 118-120;Boecillo;Valladolid=
;47151;Espa=F1a
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Parque Tecnol=F3gico de Boecillo=0D=0AParcelas 118-120=0D=0ABoecillo, Vallad=
olid 47151=0D=0AEspa=F1a
EMAIL;PREF;INTERNET:emambr@tid.es
REV:20020530T144402Z
END:VCARD
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How can I recreate the template0 database?
2005-03-09 07:32 How can I recreate the template0 database? Eduardo Mambrilla Martínez <emambr@tid.es>
@ 2005-03-14 15:59 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-03-14 20:03 ` Re: How can I recreate the template0 database? Alvaro Herrera <alvherre@dcc.uchile.cl>
0 siblings, 1 reply; 3+ messages in thread
From: Scott Marlowe @ 2005-03-14 15:59 UTC (permalink / raw)
To: Eduardo Mambrilla Martínez <emambr@tid.es>; +Cc: pgsql-admin
On Wed, 2005-03-09 at 01:32, Eduardo Mambrilla Martínez wrote:
> I made a mistake, I droped the template0 database...
> How can I recreate it?
Do you still have template1? If so, connect in single user mode, enter:
postgres template1
create database template0 with template template1
update pg_database set datallowconn = false where datname='template0';
Use CTRL-D to exit.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How can I recreate the template0 database?
2005-03-09 07:32 How can I recreate the template0 database? Eduardo Mambrilla Martínez <emambr@tid.es>
2005-03-14 15:59 ` Re: How can I recreate the template0 database? Scott Marlowe <smarlowe@g2switchworks.com>
@ 2005-03-14 20:03 ` Alvaro Herrera <alvherre@dcc.uchile.cl>
0 siblings, 0 replies; 3+ messages in thread
From: Alvaro Herrera @ 2005-03-14 20:03 UTC (permalink / raw)
To: Scott Marlowe <smarlowe@g2switchworks.com>; +Cc: Eduardo Mambrilla Martínez <emambr@tid.es>; pgsql-admin
On Mon, Mar 14, 2005 at 09:59:14AM -0600, Scott Marlowe wrote:
> On Wed, 2005-03-09 at 01:32, Eduardo Mambrilla Martínez wrote:
> > I made a mistake, I droped the template0 database...
> > How can I recreate it?
>
> Do you still have template1? If so, connect in single user mode, enter:
> postgres template1
> create database template0 with template template1
> update pg_database set datallowconn = false where datname='template0';
I think it'd be wise to issue a VACUUM FULL; VACUUM FREEZE in the newly
created template0 before disallowing connections to it.
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"El número de instalaciones de UNIX se ha elevado a 10,
y se espera que este número aumente" (UPM, 1972)
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-03-14 20:03 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-09 07:32 How can I recreate the template0 database? Eduardo Mambrilla Martínez <emambr@tid.es>
2005-03-14 15:59 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-03-14 20:03 ` Alvaro Herrera <alvherre@dcc.uchile.cl>
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