Re: reloption to prevent VACUUM from truncating empty pages at theend of relation
От
Alvaro Herrera
Тема
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation
Дата
Msg-id
20180417181836.qrmt6mp72tmalqf7@alvherre.pgsql
Ответ на
Список
Дерево обсуждения
reloption to prevent VACUUM from truncating empty pages at the end of relation Fujii Masao <masao.fujii@gmail.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andres Freund <andres@anarazel.de>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Andres Freund <andres@anarazel.de>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andres Freund <andres@anarazel.de>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Amit Kapila <amit.kapila16@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andres Freund <andres@anarazel.de>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Pavel Stehule <pavel.stehule@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Laurenz Albe <laurenz.albe@cybertec.at>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Alvaro Herrera <alvherre@2ndquadrant.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Amit Kapila <amit.kapila16@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Jamison, Kirk" <k.jamison@jp.fujitsu.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Jamison, Kirk" <k.jamison@jp.fujitsu.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Laurenz Albe <laurenz.albe@cybertec.at>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Julien Rouhaud <rjuju123@gmail.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Julien Rouhaud <rjuju123@gmail.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Masahiko Sawada <sawada.mshk@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Masahiko Sawada <sawada.mshk@gmail.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Masahiko Sawada <sawada.mshk@gmail.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Julien Rouhaud <rjuju123@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Robert Haas <robertmhaas@gmail.com>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Michael Paquier <michael@paquier.xyz>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Alvaro Herrera <alvherre@2ndquadrant.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Laurenz Albe <laurenz.albe@cybertec.at>
RE: reloption to prevent VACUUM from truncating empty pages at theend of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Robert Haas <robertmhaas@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Masahiko Sawada <sawada.mshk@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation "Bossart, Nathan" <bossartn@amazon.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andres Freund <andres@anarazel.de>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation "Bossart, Nathan" <bossartn@amazon.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andres Freund <andres@anarazel.de>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation "Bossart, Nathan" <bossartn@amazon.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andres Freund <andres@anarazel.de>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation "Bossart, Nathan" <bossartn@amazon.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Masahiko Sawada <sawada.mshk@gmail.com>
Re: Re: reloption to prevent VACUUM from truncating empty pages atthe end of relation David Steele <david@pgmasters.net>
RE: Re: reloption to prevent VACUUM from truncating empty pages atthe end of relation "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: Re: reloption to prevent VACUUM from truncating empty pages atthe end of relation Robert Haas <robertmhaas@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Laurenz Albe <laurenz.albe@cybertec.at>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Alvaro Herrera <alvherre@2ndquadrant.com>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Sergei Kornilov <sk@zsrv.org>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andres Freund <andres@anarazel.de>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Andres Freund <andres@anarazel.de>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Simon Riggs <simon@2ndquadrant.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Peter Geoghegan <pg@bowt.ie>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Pavan Deolasee <pavan.deolasee@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Fujii Masao <masao.fujii@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at theend of relation Pavan Deolasee <pavan.deolasee@gmail.com>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Re: reloption to prevent VACUUM from truncating empty pages at the end of relation Tom Lane <tgl@sss.pgh.pa.us>
Tom Lane wrote: > Fujii Masao writes: > > When VACUUM tries to truncate the trailing empty pages, it scans shared_buffers > > to invalidate the pages-to-truncate during holding an AccessExclusive lock on > > the relation. So if shared_buffers is huge, other transactions need to wait for > > a very long time before accessing to the relation. Which would cause the > > response-time spikes, for example, I observed such spikes several times on > > the server with shared_buffers = 300GB while running the benchmark. > > Therefore, I'm thinking to propose $SUBJECT and enable it to avoid such spikes > > for that relation. > > I think that the real problem here is having to do a scan of all of shared > buffers. VACUUM's not the only thing that has to do that, there's also > e.g. DROP and TRUNCATE. So rather than a klugy solution that only fixes > VACUUM (and not very well, requiring user intervention and an unpleasant > tradeoff), we ought to look at ways to avoid needing a whole-pool scan to > find the pages belonging to one relation. In the past we've been able to > skate by without a decent solution for that because shared buffers were > customarily not all that big. But if we're going to start considering > huge buffer pools to be a case we want to have good performance for, > that's got to change. Andres was working on a radix tree structure to fix this problem, but that seems to be abandoned now, and it seems a major undertaking. While I agree that the proposed solution is a wart, it seems much better than no solution at all. Can we consider Fujii's proposal as a temporary measure until we fix shared buffers? I'm +1 on it myself. We've seen this problem also affecting a production workload pretty severely, though shared_buffers is not as big. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления
От: Peter Geoghegan
Дата:
От: Tom Lane
Дата: