Re: Freeze avoidance of very large table.

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Subject: Re: Freeze avoidance of very large table.
Date: 2015-08-19 07:56:48
Message-ID: CAD21AoD5XuewqF8R9DZ4M8ikMf7Ru8-HMsP3WdZKo7MAXmzEyA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 19, 2015 at 1:28 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Aug 18, 2015 at 7:27 AM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>> I have encountered the much cases where pg_stat_statement,
>> pgstattuples are required in production, so I basically agree with
>> moving such extension into core.
>> But IMO, the diagnostic tools for visibility map, heap (pageinspect)
>> and so on, are a kind of debugging tool.
>
> Just because something might be required in production isn't a
> sufficient reason to put it in core. Debugging tools, or anything
> else, can be required in production, too.
>
>> Attached latest v11 patches, which is separated into 2 patches: frozen
>> bit patch and diagnostic function patch.
>> Moving diagnostic function into core is still under the discussion,
>> but this patch puts such function into core because the diagnostic
>> function for visibility map needs to be in core to execute regression
>> test at least.
>
> As has been discussed recently, there are other ways to handle that.

The currently regression test for VM is that we just compare between
the total number of all-visible and all-frozen in VM before and after
VACUUM, and don't check particular a bit in VM.
we could substitute it to the ANALYZE command with enough sampling
number and checking pg_class.relallvisible and pg_class.relallfrozen.

So another way is that diagnostic function for VM is put into
something contrib (pg_freespacemap or pageinspect), and if we want to
use such function in production, we can install such extension as in
the past.

Regards,

--
Masahiko Sawada

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2015-08-19 08:03:12 Re: Declarative partitioning
Previous Message Victor Wagner 2015-08-19 07:53:04 Re: Proposal: Implement failover on libpq connect level.