Re: Documentation fixes for pg_visibility

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Documentation fixes for pg_visibility
Date: 2016-06-27 21:56:43
Message-ID: CAB7nPqQtNze0ygqaq08hqCb_uiEw4g4Me2iMaZ2EZ6rFD72ZvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 28, 2016 at 6:51 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Jun 23, 2016 at 12:53 AM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> On Thu, Jun 23, 2016 at 1:46 PM, Michael Paquier
>> <michael(dot)paquier(at)gmail(dot)com> wrote:
>>> On Thu, Jun 23, 2016 at 1:42 PM, Michael Paquier
>>> <michael(dot)paquier(at)gmail(dot)com> wrote:
>>>> While looking at the module I found two mistakes in the docs:
>>>> pg_visibility_map and pg_visibility *not* taking in input a block
>>>> number are SRFs, and return a set of records. The documentation is
>>>> just listing them with "returns record". A patch is attached.
>>>
>>> And that: s/PD_ALL_VISIBILE/PD_ALL_VISIBLE.
>>
>> And would it actually make sense to have pg_check_frozen(IN regclass,
>> IN blkno) to target only a certain page? Same for pg_check_visible. It
>> would take a long time to run those functions on large tables as they
>> scan all the pages of a relation at once..
>
> Under what circumstances would you wish to check only one page of a relation?

What I'd like to be able to do is to stop scanning the relation once
one defective tuple has been found: if there is at least one problem,
the whole vm needs to be rebuilt anyway. So this function could be
wrapped in a plpgsql function for example. It is more flexible than
directly modifying this function so as it stops at the first problem
stopped.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-06-27 21:57:29 Re: Documentation fixes for pg_visibility
Previous Message Robert Haas 2016-06-27 21:51:46 Re: Documentation fixes for pg_visibility