Reduce size of $PGDATA for "demo cdrom"? - Mailing list pgsql-general

From Philip Hallstrom
Subject Reduce size of $PGDATA for "demo cdrom"?
Date
Msg-id 20050427080339.X51875@wolf.pjkh.com
Whole thread Raw
Responses Re: Reduce size of $PGDATA for "demo cdrom"?  (Scott Marlowe <smarlowe@g2switchworks.com>)
List pgsql-general
Hi all -
     We've got a product built on FreeBSD and PostgreSQL 7.4.2 that
I've had to fit onto an installable CDROM tradeshows and customer demos.
This is the only way I've found to ensure an easy to re-install option
for the non-technical folks at the tradeshows should they corrupt the box
itself.  This part all works fine.

However, I've only got 700mb to work with and the bootable CDROM takes a
chunk of that as does the rest of our app.

Doing a pg_dumpall of the database results in a 369Kb file.

However, $PGDATA is around 60mb.

root@tradeshow:/local/pgsql/data% du -hcs base/* pg_xlog/*
4.4M    base/1
4.4M    base/17141
4.4M    base/17144
4.4M    base/17145
6.6M    base/17146
5.4M    base/17147
  16M    pg_xlog/0000000000000006
  16M    pg_xlog/0000000000000007
  62M    total


My question is what's the best way to trim that down?  I realize I could
remove it completely and have my install script do an initdb, etc, but if
there's anyway to keep the installation intact to begin with I'd prefer
that.

Is there any other way to trim the size of those files?  Maybe dump
everything out, "clean up", then restore it.  Then immediately burn things
to CD?  Or if there are postgresql.conf options I can set to not keep WAL
logs, etc around that would work too since this is just for tradeshows...

Thanks all!

-philip


pgsql-general by date:

Previous
From: Sebastian Böck
Date:
Subject: Re: PRIMARY KEY on a *group* of columns imply that each
Next
From: Stephane Bortzmeyer
Date:
Subject: Re: PRIMARY KEY on a *group* of columns imply that each column is NOT