pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Crooke <dcrooke@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Pierre C <lists@peufeu.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Block at a time ...
Date: Wed, 17 Mar 2010 10:16:00 -0500
Message-ID: <ca24673e1003170816r4690672xc83252fa3f71b23d@mail.gmail.com> (raw)
In-Reply-To: <27894.1268836024@sss.pgh.pa.us>
References: <ca24673e1003161658g6a0fa30dg2c158db395ac08@mail.gmail.com>
	<20100317001405.GL3037@alvh.no-ip.org>
	<op.u9pa7vzleorkce@localhost>
	<407d949e1003170252y72d223c3kcc18266140a60997@mail.gmail.com>
	<27894.1268836024@sss.pgh.pa.us>

Greg - with Oracle, I always do fixed 2GB dbf's for poartability, and
preallocate the whole file in advance. However, the situation is a bit
different in that Oracle will put blocks from multiple tables and indexes in
a DBF if you don't tell it differently.

Tom - I'm not sure what Oracle does, but it literally writes the whole
extent before using it .... I think they are just doing the literal
equivalent of *dd if=/dev/zero* ... it takes several seconds to prep a 2GB
file on decent storage.

Cheers
Dave

On Wed, Mar 17, 2010 at 9:27 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Greg Stark <gsstark@mit.edu> writes:
> > I think we need posix_fallocate().
>
> The problem with posix_fallocate (other than questionable portability)
> is that it doesn't appear to guarantee anything at all about what is in
> the space it allocates.  Worst case, we might find valid-looking
> Postgres data there (eg, because a block was recycled from some recently
> dropped table).  If we have to write something anyway to zero the space,
> what's the point?
>
>                        regards, tom lane
>

view thread (14+ messages)  latest in thread

Message-ID: <ca24673e1003170816r4690672xc83252fa3f71b23d@mail.gmail.com>
Permalink:  ../ca24673e1003170816r4690672xc83252fa3f71b23d@mail.gmail.com/
Also on:    postgresql.org/message-id/ca24673e1003170816r4690672xc83252fa3f71b23d@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dcrooke@gmail.com, tgl@sss.pgh.pa.us, gsstark@mit.edu, lists@peufeu.com, alvherre@commandprompt.com
  Subject: Re: Block at a time ...
  In-Reply-To: <ca24673e1003170816r4690672xc83252fa3f71b23d@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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