Re: the big picture for index-only scans

From: Gokulakannan Somasundaram <gokul007(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: the big picture for index-only scans
Date: 2011-08-20 08:57:03
Message-ID: CAHMh4-YXnSSOxv+KosKyLn9Nq8SwPfskCGYD9W68Ffgoe2u+Yg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Hmm, you have a point. If 100 backends simultaneously write to 100
> different pages, and all of those pages are all-visible, then it's
> possible that they could end up fighting over the buffer content lock
> on the visibility map page. But why would you expect that to matter?
> In a heavily updated table, the proportion of visibility map bits that
> are set figures to be quite low, since they're only set during VACUUM.
> To have 100 backends simultaneously pick different pages to write
> each of which is all-visible seems really unlucky. Even if it does
> happen from time to time, I suspect the effects would be largely
> masked by WALInsertLock contention. The visibility map content lock
> is only taken very briefly, whereas the operations protected by
> WALInsertLock are much more complex.
>

by your argument, if WALInserLock is held for 't' seconds, you should
definitely be holding visibility map lock for more than time frame 't' . So
the index scans have to wait for acquiring the lock on visibility map to
check visibility. What we are trading off here is Synchronization Vs I/O.
Should we lose the scalability for performance??

Gokul.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gokulakannan Somasundaram 2011-08-20 09:06:41 Re: the big picture for index-only scans
Previous Message Gokulakannan Somasundaram 2011-08-20 08:48:54 Re: the big picture for index-only scans