Re: [HACKERS] include/config.h FOLLOWUP

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: scrappy(at)hub(dot)org (The Hermit Hacker)
Cc: abrams(at)philos(dot)umass(dot)edu, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] include/config.h FOLLOWUP
Date: 1998-01-04 15:50:53
Message-ID: 199801041550.KAA01599@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> On Sat, 3 Jan 1998, Bruce Momjian wrote:
>
> > I believe it is 8k to match the base size for the filesystem block size,
> > for performance.
>
> Hrmmm...how does one find out what the file system block size is? I know
> there is an option to newfs for changing this, and at least under FreeBSD, the
> default is set to:
>
> sys/param.h:#define DFLTBSIZE 4096
>
> So maybe a multiple of block size should be considered more appropriate?
> Maybe have it so that you can stipulate # of blocks that equal max tuple size?
> Then, if I wanted, I could format a drive with a block size of 16k that is only
> going to be used for databases, and have a tuple size up to that level?
>

Yes, you certainly could do that. The comment says:

/*
* the maximum size of a disk block for any possible installation.
*
* in theory this could be anything, but in practice this is actually
* limited to 2^13 bytes because we have limited ItemIdData.lp_off and
* ItemIdData.lp_len to 13 bits (see itemid.h).
*/
#define MAXBLCKSZ 8192

You can now specify the actual file system block size at the time of
newfs. We actually could query the file system at time of compile, but
that would be strange becuase the database location is set at time of
postmaster startup, and I don't think we can make this a run-time
parameter, but I may be wrong.

Of course, you have to change the structures the mention.

--
Bruce Momjian
maillist(at)candle(dot)pha(dot)pa(dot)us

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-01-04 18:18:53 Re: [HACKERS] include/config.h FOLLOWUP
Previous Message Boersenspielteam 1998-01-04 14:04:44 Re: Error messages/logging (Was: Re: [HACKERS] Re: [COMMITTERS]