expanding our usage of POSIX_FADVISE - Mailing list pgsql-hackers

From Cédric Villemain
Subject expanding our usage of POSIX_FADVISE
Date
Msg-id 200908121607.15606.cedric.villemain@dalibo.com
Whole thread Raw
Responses Re: expanding our usage of POSIX_FADVISE  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Hello,<br /><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0;text-indent:0px; -qt-user-state:0;"><br />I wonder if POSIX_FADV_RANDOM and POSIX_FADV_SEQUENTIAL
arestill innacurate for postgreSQL ?<br /><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px;
margin-left:0px;margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br />I find <br /> «A
relatedproblem is that the smgr uses the same FD to access the same relation no matter how many scans are in progress.
Thinkabout a complex query that is doing both a seqscan and an indexscan on the same relation (a self-join could easily
dothis). You'd really need to change this if you want POSIX_FADV_SEQUENTIAL and <span style="
font-weight:600;">POSIX_FADV_RANDOM</span>to get set usefully. <br /> » (tom lane, 2003)<br /><p
style="-qt-paragraph-type:empty;margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0;text-indent:0px; -qt-user-state:0;"><br />And also :<br /> «<br /> Surely POSIX_FADV_SEQUENTIAL is
theone intended to hint seq scans, and <span style=" font-weight:600;">POSIX_FADV_RANDOM</span> to hint random access.
No?<br /><p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0;
text-indent:0px;-qt-user-state:0;">ISTM, _WILLNEED seems just right for small random-access blocks. <p style="
margin-top:12px;margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
-qt-user-state:0;">Anyway,for those who want to see what they do in Linux, <a
href="http://www.gelato.unsw.edu.au/lxr/source/mm/fadvise.c"><spanstyle=" text-decoration: underline;
color:#0057ae;">http://www.gelato.unsw.edu.au/lxr/source/mm/fadvise.c</span></a>Pretty scary that Bruce said it could
makeolder linuxes dump core - there isn't a lot of code there. <p style=" margin-top:12px; margin-bottom:12px;
margin-left:0px;margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">» (ron mayer, 2006)<p
style="-qt-paragraph-type:empty;margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;
-qt-block-indent:0;text-indent:0px; -qt-user-state:0;"><br />But that seems a bit old. <br /> ----<br /> Cédric
Villemain<br/> Administrateur de Base de Données<br /> Cel: +33 (0)6 74 15 56 53<br /> http://dalibo.com -
http://dalibo.org

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: machine-readable explain output v4
Next
From: Robert Haas
Date:
Subject: Re: machine-readable explain output v4