Re: Where is the decision about placement of new tuple made ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Where is the decision about placement of new tuple made ?
Date
Msg-id 19044.1121178411@sss.pgh.pa.us
Whole thread Raw
In response to Where is the decision about placement of new tuple made ?  (Hannu Krosing <hannu@skype.net>)
List pgsql-hackers
Hannu Krosing <hannu@skype.net> writes:
> Where in the source is the decision about the placement new tuple (on
> which page to put it) made ?

RelationGetBufferForTuple() and the free space map
src/backend/access/heap/hio.c
src/backend/storage/freespace/freespace.c

> I'd like to take a look at adding "gravity" to that decision, do that I
> can make postgres to decide to place new tuple (inserted or updated)
> near the beginning of file,

I have strong doubts about this idea.  The existing policy is designed
to reduce contention by having different backends inserting into
different pages.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Where is the decision about placement of new tuple made ?
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] thousands comma numeric formatting in psql