Re: Where art thou pg_clog?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Casey Duncan <casey(at)pandora(dot)com>
Cc: PostgreSQL-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Where art thou pg_clog?
Date: 2007-02-16 17:50:51
Message-ID: 20070216175051.GA870@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Casey Duncan wrote:
>
> On Feb 15, 2007, at 5:50 PM, Alvaro Herrera wrote:

> >Hum, yeah, I forgot to mention that you need to create the 098E
> >pg_clog
> >segment for that to work at all :-) Fill it with byte 0x55 till the
> >needed position, which is the bit pattern for "all transactions
> >committed". I'd make sure to remove it manually after the freeze is
> >done, just in case! (I think the system would remove it at next
> >checkpoint, but anyway.)
>
> That seems a bit scary to do on a running production server. Could I
> get away with dropping the template0 database and loading one from
> another identical pg instance (or a new one) or will that freak
> things out?

If you haven't modified template1 since initdb, you can recreate
template0 by just dropping it and copying from template1; then do a
VACUUM FREEZE and set datallowconn to false. That's what initdb does.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Harding 2007-02-16 17:52:18 Re: problems: slow queries with tsearch2
Previous Message Ezequias Rodrigues da Rocha 2007-02-16 17:46:41 Have anyone this man e-mail ?