Re: [HACKERS] include/config.h FOLLOWUP

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] include/config.h FOLLOWUP
Дата
Msg-id 199801041550.KAA01599@candle.pha.pa.us
обсуждение исходный текст
Ответы Re: [HACKERS] include/config.h FOLLOWUP  (The Hermit Hacker <scrappy@hub.org>)
Список 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@candle.pha.pa.us

В списке pgsql-hackers по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: New Snapshot(s)
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] include/config.h FOLLOWUP