Re: Index Scans become Seq Scans after VACUUM ANALYSE
От | Bruce Momjian |
---|---|
Тема | Re: Index Scans become Seq Scans after VACUUM ANALYSE |
Дата | |
Msg-id | 200206231934.g5NJYtL07449@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Index Scans become Seq Scans after VACUUM ANALYSE ("J. R. Nield" <jrnield@usol.com>) |
Список | pgsql-hackers |
J. R. Nield wrote: > So since we have all this buffering designed especially to meet our > needs, and since the OS buffering is in the way, can someone explain to > me why postgresql would ever open a file without the O_DSYNC flag if the > platform supports it? We sync only WAL, not the other pages, except for the sync() call we do during checkpoint when we discard old WAL files. > > I concur with Bruce: the reason we keep page images in WAL is to > > minimize the number of places we have to fsync, and thus the amount of > > head movement required for a commit. Putting the page images elsewhere > > cannot be a win AFAICS. > > > Why not put all the page images in a single pre-allocated file and treat > it as a ring? How could this be any worse than flushing them in the WAL > log? > > Maybe fsync would be slower with two files, but I don't see how > fdatasync would be, and most platforms support that. We have fdatasync option for WAL in postgresql.conf. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: