Re: Freeze avoidance of very large table. - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Freeze avoidance of very large table.
Date
Msg-id CANP8+jKEyEUz5OoSoJFmQRPkvFep4dNZUnhqNXnLrD678+_=EQ@mail.gmail.com
Whole thread Raw
In response to Re: Freeze avoidance of very large table.  (Sawada Masahiko <sawada.mshk@gmail.com>)
Responses Re: Freeze avoidance of very large table.  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 7 July 2015 at 15:18, Sawada Masahiko <sawada.mshk@gmail.com> wrote:
 
> I would also like to see the visibilitymap_test function exposed in SQL,
> so we can write code to examine the map contents for particular ctids.
> By doing that we can then write a formal test that shows the evolution of tuples from insertion,
> vacuuming and freezing, testing the map has been set correctly at each stage.
> I guess that needs to be done as an isolationtest so we have an observer that contrains the xmin in various ways.
> In light of multixact bugs, any code that changes the on-disk tuple metadata needs formal tests.

Attached patch adds a few function to contrib/pg_freespacemap to
explore the inside of visibility map, which I used for my test.
I hope it helps for testing this feature.

I don't think pg_freespacemap is the right place.

I'd prefer to add that as a single function into core, so we can write formal tests. I would not personally commit this feature without rigorous and easily repeatable verification.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Repeated pg_upgrade buildfarm failures on binturon
Next
From: Michael Paquier
Date:
Subject: Re: New functions