Re: WIP: Avoid creation of the free space map for small tables
От
Amit Kapila
Тема
Re: WIP: Avoid creation of the free space map for small tables
Дата
Msg-id
CAA4eK1+3DCuosH4xJrOhiEcJpYOyc8efcAf+HRU=D5Our3GZKg@mail.gmail.com
Ответ на
Список
Дерево обсуждения
WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Mithun Cy <mithun.cy@enterprisedb.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Mithun Cy <mithun.cy@enterprisedb.com>
Re: WIP: Avoid creation of the free space map for small tables Mithun Cy <mithun.cy@enterprisedb.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Mithun Cy <mithun.cy@enterprisedb.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Peter Geoghegan <pg@bowt.ie>
Re: WIP: Avoid creation of the free space map for small tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Robert Haas <robertmhaas@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Alvaro Herrera <alvherre@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Petr Jelinek <petr.jelinek@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Masahiko Sawada <sawada.mshk@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Masahiko Sawada <sawada.mshk@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Masahiko Sawada <sawada.mshk@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <john.naylor@2ndquadrant.com>
Re: WIP: Avoid creation of the free space map for small tables Tom Lane <tgl@sss.pgh.pa.us>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Mithun Cy <mithun.cy@enterprisedb.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Mithun Cy <mithun.cy@enterprisedb.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Robert Haas <robertmhaas@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Robert Haas <robertmhaas@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Tom Lane <tgl@sss.pgh.pa.us>
Re: WIP: Avoid creation of the free space map for small tables Robert Haas <robertmhaas@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Michael Paquier <michael@paquier.xyz>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Amit Kapila <amit.kapila16@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Thomas Munro <thomas.munro@enterprisedb.com>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
Re: WIP: Avoid creation of the free space map for small tables Tom Lane <tgl@sss.pgh.pa.us>
Re: WIP: Avoid creation of the free space map for small tables John Naylor <jcnaylor@gmail.com>
On Mon, Feb 11, 2019 at 10:48 PM John Naylor wrote: > > On 2/9/19, Amit Kapila wrote: > > > Shall we add a note to the docs of pg_freespacemap and > > pgstattuple_approx indicating that for small relations, FSM won't be > > created, so these functions won't give appropriate value? > > I've given this a try in 0002. > This looks mostly correct, but I have a few observations: 1. - tuples. + tuples. Small tables don't have a free space map, so in that case + this function will report zero free space, likewise inflating the + estimated number of live tuples. The last part of the sentence "likewise inflating the estimated number of live tuples." seems incorrect to me because live tuples are computed based on the pages scanned, live tuples in them and total blocks in the relation. So, I think it should be "likewise inflating the approximate tuple length". 2. + In addition, small tables don't have a free space map, so this function + will return zero even if free space is available. Actually, the paragraph you have modified applies to both the functions mentioned on that page. So instead of saying "this function ..", we can say "these functions .." 3. * space from the FSM and move on. + * Note: If a relation has no FSM, GetRecordedFreeSpace() will report + * zero free space. This is fine for the purposes of approximation. */ It is better to have an empty line before Note: ... I have modified the patch for the above observations and added a commit message as well, see if it looks okay to you. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления
От: John Naylor
Дата: