Re: Getting rid of excess lseeks()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "mascarm(at)mascari(dot)com" <mascarm(at)mascari(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Getting rid of excess lseeks()
Date: 2001-05-11 02:21:05
Message-ID: 10109.989547665@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mike Mascari <mascarm(at)mascari(dot)com> writes:
> If your idea works, would it be possible, or even a good idea, to
> have PostgreSQL extend the relation in a non-linear fashion?

The trick would be to ensure that the extra blocks actually got used
for something ... without more logic than is there now, all the backends
would glom onto the last new page and ignore the possibility of putting
tuples into the other pages you'd added.

The hack I've proposed (and am currently testing) doesn't really do
anything to reduce the per-page overhead of extending the relation.
What it does do is reduce the per-tuple overhead of adding tuples
to an extant last page. Basically we are down to an lseek per block
instead of an lseek per tuple ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-05-11 02:25:53 Re: 7.1.2 release
Previous Message Jon Lapham 2001-05-11 02:06:14 Re: Problem with a rule on upgrade to v7.1.1