agora inbox for pgsql-interfaces@postgresql.org  
help / color / mirror / Atom feed
Initial database size on disk
6+ messages / 4 participants
[nested] [flat]

* Initial database size on disk
@ 2010-06-19 23:54  Murray Cumming <murrayc@murrayc.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Murray Cumming @ 2010-06-19 23:54 UTC (permalink / raw)
  To: pgsql-interfaces

When using the initdb command-line utility to create a new PostgreSQL
database cluster, is there any way to specify the starting size used on
disk? By default it seems to take around 38MB.


-- 
murrayc@murrayc.com
www.murrayc.com
www.openismus.com




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Initial database size on disk
@ 2010-06-20 00:22  Simon Riggs <simon@2ndQuadrant.com>
  parent: Murray Cumming <murrayc@murrayc.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Simon Riggs @ 2010-06-20 00:22 UTC (permalink / raw)
  To: Murray Cumming <murrayc@murrayc.com>; +Cc: pgsql-interfaces

On Sun, 2010-06-20 at 01:54 +0200, Murray Cumming wrote:

> When using the initdb command-line utility to create a new PostgreSQL
> database cluster, is there any way to specify the starting size used on
> disk? By default it seems to take around 38MB.

Why do you want to do that? Make it bigger, or smaller?

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Development, 24x7 Support, Training and Services




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Initial database size on disk
@ 2010-06-20 08:23  Murray Cumming <murrayc@murrayc.com>
  parent: Simon Riggs <simon@2ndQuadrant.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Murray Cumming @ 2010-06-20 08:23 UTC (permalink / raw)
  To: Simon Riggs <simon@2ndQuadrant.com>; +Cc: pgsql-interfaces

On Sun, 2010-06-20 at 01:22 +0100, Simon Riggs wrote:
> On Sun, 2010-06-20 at 01:54 +0200, Murray Cumming wrote:
> 
> > When using the initdb command-line utility to create a new PostgreSQL
> > database cluster, is there any way to specify the starting size used on
> > disk? By default it seems to take around 38MB.
> 
> Why do you want to do that? Make it bigger, or smaller?

I would like to make it smaller. I use PostgreSQL in my Glom application
to host (initially) small amounts of data, starting a PostgreSQL
instance automatically whenever the data must be opened.

-- 
murrayc@murrayc.com
www.murrayc.com
www.openismus.com




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Initial database size on disk
@ 2010-06-20 10:58  Simon Riggs <simon@2ndQuadrant.com>
  parent: Murray Cumming <murrayc@murrayc.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Simon Riggs @ 2010-06-20 10:58 UTC (permalink / raw)
  To: Murray Cumming <murrayc@murrayc.com>; +Cc: pgsql-interfaces

On Sun, 2010-06-20 at 10:23 +0200, Murray Cumming wrote:
> On Sun, 2010-06-20 at 01:22 +0100, Simon Riggs wrote:
> > On Sun, 2010-06-20 at 01:54 +0200, Murray Cumming wrote:
> > 
> > > When using the initdb command-line utility to create a new PostgreSQL
> > > database cluster, is there any way to specify the starting size used on
> > > disk? By default it seems to take around 38MB.
> > 
> > Why do you want to do that? Make it bigger, or smaller?
> 
> I would like to make it smaller. I use PostgreSQL in my Glom application
> to host (initially) small amounts of data, starting a PostgreSQL
> instance automatically whenever the data must be opened.

You can compile it smaller if you want, though you might hit some
problems nobody has seen before.

There appears to be a fair amount of "wasted" space, which tells me
nobody has ever really looked at this.

WAL files are 16MB, so you're main problem is there.

Use a compressed filesystem.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Development, 24x7 Support, Training and Services




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Initial database size on disk
@ 2010-06-20 12:59  Devrim GUNDUZ <devrim@gunduz.org>
  parent: Murray Cumming <murrayc@murrayc.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Devrim GUNDUZ @ 2010-06-20 12:59 UTC (permalink / raw)
  To: Murray Cumming <murrayc@murrayc.com>; +Cc: pgsql-interfaces


20.Haz.2010 tarihinde 02:54 saatinde, Murray Cumming <murrayc@murrayc.com 
 > şunları yazdı:

> When using the initdb command-line utility to create a new PostgreSQL
> database cluster, is there any way to specify the starting size used  
> on
> disk? By default it seems to take around 38MB.

You can recompile PostgreSQL with a smaller wal size, which will  
reduce initial size a bit. I am not sure about the side effects though.

Regards.
--
Devrim GÜNDÜZ
PostgreSQL DBA @ Akinon/Markafoni, Red Hat Certified Engineer
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Initial database size on disk
@ 2010-06-20 15:11  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Devrim GUNDUZ <devrim@gunduz.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2010-06-20 15:11 UTC (permalink / raw)
  To: Devrim GUNDUZ <devrim@gunduz.org>; +Cc: Murray Cumming <murrayc@murrayc.com>; pgsql-interfaces

Devrim GUNDUZ <devrim@gunduz.org> writes:
> 20.Haz.2010 tarihinde 02:54 saatinde, Murray Cumming <murrayc@murrayc.com 
>>> şunları yazdı:
>> When using the initdb command-line utility to create a new PostgreSQL
>> database cluster, is there any way to specify the starting size used  
>> on disk? By default it seems to take around 38MB.

> You can recompile PostgreSQL with a smaller wal size, which will  
> reduce initial size a bit. I am not sure about the side effects though.

There might be some value in that if you expect your database instances
will always be small and low in write volume.  Otherwise you're just
shooting yourself in the foot for a transitory gain.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2010-06-20 15:11 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-06-19 23:54 Initial database size on disk Murray Cumming <murrayc@murrayc.com>
2010-06-20 00:22 ` Simon Riggs <simon@2ndQuadrant.com>
2010-06-20 08:23   ` Murray Cumming <murrayc@murrayc.com>
2010-06-20 10:58     ` Simon Riggs <simon@2ndQuadrant.com>
2010-06-20 12:59 ` Devrim GUNDUZ <devrim@gunduz.org>
2010-06-20 15:11   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox