From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Matthew Kirkwood <matthew(at)hairy(dot)beasts(dot)org>, Hackers List <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: New Linux xfs/reiser file systems |
Date: | 2001-05-03 15:42:18 |
Message-ID: | 200105031542.f43FgIX27124@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Matthew Kirkwood <matthew(at)hairy(dot)beasts(dot)org> writes:
> > From some stracing of 7.1, the most common syscall issued by
> > postgres is an lseek() to the end of the file, presumably to
> > find its length, which seems to happen up to about a dozen
> > times per (pgbench) transaction.
>
> > Tablespaces would solve this (not that lseek is a particularly
> > expensive operation, of course).
>
> No, they wouldn't; or at least they'd just create a different problem.
> The reason for the lseek is that the file length may have changed since
> the current backend last checked it. To avoid lseek we'd need some
> shared data structure that maintains the current length of every active
> table, which would be a nuisance to maintain and probably a source of
> contention delays.
Seems we should cache the file lengths somehow. Not sure how to do it
because our file system cache is local to each backend.
> (Of course, such a data structure would just be the tip of the iceberg
> of what we'd have to maintain for ourselves if we couldn't depend on the
> kernel to do it for us. Reimplementing a filesystem doesn't strike me
> as a profitable use of our time.)
Ditto. The database is complicated enough.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Alessio Bragadini | 2001-05-03 15:43:55 | Re: A problem with pg_dump? |
Previous Message | Bruce Momjian | 2001-05-03 15:41:24 | Re: New Linux xfs/reiser file systems |