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.