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+hGEcpmaYyeZpRXOancjuQ1zWf3NL3yjtoxM_dvYyW9Q@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 Thu, Nov 29, 2018 at 3:07 PM John Naylor wrote: > - * Copy/link any fsm and vm files, if they exist + * Copy/link any fsm and vm files, if they exist and if they would + * be created in the new cluster. */ - transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit); + if (maps[mapnum].relkind != RELKIND_RELATION || + first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ || + GET_MAJOR_VERSION(new_cluster.major_version) <= 1100) + (void) transfer_relfile (&maps[mapnum], "_fsm", vm_must_add_frozenbit); > During pg_upgrade, skip transfer of FSMs if they wouldn't have been created on the new cluster. I think in some cases, it won't be consistent with HEAD's behavior. After truncate, we leave the FSM as it is, so the case where before upgrade the relation was truncated, we won't create the FSM in new cluster and that will be inconsistent with the behavior of HEAD. I think similar anomaly will be there when we delete rows from the table such that after deletion size of relation becomes smaller than HEAP_FSM_CREATION_THRESHOLD. I am not sure if it is a good idea to *not* transfer FSM files during upgrade unless we ensure that we remove FSM whenever the relation size falls below HEAP_FSM_CREATION_THRESHOLD. What do you think? BTW, what is your reasoning for not removing FSM on truncate? Anybody else has an opinion on this matter? -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления
От: John Naylor
Дата:
От: Amit Kapila
Дата: