Re: [HACKERS] Documentation fixes for pg_visibility

2016-07-06 Thread Amit Kapila
On Tue, Jul 5, 2016 at 8:51 PM, Robert Haas wrote: > > So I'm a bit confused about what you are saying here. If the page is > marked all-frozen but actually isn't all-frozen, then we should clear > the all-frozen bit in the VM. > Agreed. > The easiest way to do that is to clear > both bits in

Re: [HACKERS] Documentation fixes for pg_visibility

2016-07-05 Thread Michael Paquier
Robert wrote: > I think there should probably be a test for > all_visible_according_to_vm at the beginning of that so that we don't > add more visibility map checks for pages where we already know the VM > bit can't possibly be set. Yes, that looks like a good idea after more screening of this co

Re: [HACKERS] Documentation fixes for pg_visibility

2016-07-05 Thread Robert Haas
On Fri, Jul 1, 2016 at 10:20 PM, Amit Kapila wrote: Right, something like that. I think Andres actually wants something like this in 9.6, and I'm inclined to think it might be a good idea, too. I think there should probably be a test for all_visible_according_to_vm at the beg

Re: [HACKERS] Documentation fixes for pg_visibility

2016-07-01 Thread Amit Kapila
On Fri, Jul 1, 2016 at 9:30 PM, Robert Haas wrote: > On Fri, Jul 1, 2016 at 10:09 AM, Amit Kapila wrote: Ah, I see. So your suggestion is to do this job in lazy_scan_heap() when scanning each block, and then to issue a WARNING and clear the visibility map. Indeed that's better. I g

Re: [HACKERS] Documentation fixes for pg_visibility

2016-07-01 Thread Robert Haas
On Fri, Jul 1, 2016 at 10:09 AM, Amit Kapila wrote: >>> Ah, I see. So your suggestion is to do this job in lazy_scan_heap() >>> when scanning each block, and then to issue a WARNING and clear the >>> visibility map. Indeed that's better. I guess I need to take a closer >>> look at vacuumlazy.c. Se

Re: [HACKERS] Documentation fixes for pg_visibility

2016-07-01 Thread Amit Kapila
On Fri, Jul 1, 2016 at 6:58 PM, Robert Haas wrote: > On Wed, Jun 29, 2016 at 1:42 AM, Michael Paquier > wrote: >> On Tue, Jun 28, 2016 at 7:05 AM, Robert Haas wrote: >>> On Mon, Jun 27, 2016 at 5:56 PM, Michael Paquier >>> wrote: > Under what circumstances would you wish to check only one p

Re: [HACKERS] Documentation fixes for pg_visibility

2016-07-01 Thread Robert Haas
On Wed, Jun 29, 2016 at 1:42 AM, Michael Paquier wrote: > On Tue, Jun 28, 2016 at 7:05 AM, Robert Haas wrote: >> On Mon, Jun 27, 2016 at 5:56 PM, Michael Paquier >> wrote: Under what circumstances would you wish to check only one page of a relation? >>> >>> What I'd like to be able to

Re: [HACKERS] Documentation fixes for pg_visibility

2016-06-28 Thread Michael Paquier
On Tue, Jun 28, 2016 at 7:05 AM, Robert Haas wrote: > On Mon, Jun 27, 2016 at 5:56 PM, Michael Paquier > wrote: >>> 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

Re: [HACKERS] Documentation fixes for pg_visibility

2016-06-27 Thread Robert Haas
On Mon, Jun 27, 2016 at 5:56 PM, Michael Paquier wrote: >> 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 n

Re: [HACKERS] Documentation fixes for pg_visibility

2016-06-27 Thread Robert Haas
On Thu, Jun 23, 2016 at 12:46 AM, Michael Paquier wrote: > On Thu, Jun 23, 2016 at 1:42 PM, Michael Paquier > 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 record

Re: [HACKERS] Documentation fixes for pg_visibility

2016-06-27 Thread Michael Paquier
On Tue, Jun 28, 2016 at 6:51 AM, Robert Haas wrote: > On Thu, Jun 23, 2016 at 12:53 AM, Michael Paquier > wrote: >> On Thu, Jun 23, 2016 at 1:46 PM, Michael Paquier >> wrote: >>> On Thu, Jun 23, 2016 at 1:42 PM, Michael Paquier >>> wrote: While looking at the module I found two mistakes in

Re: [HACKERS] Documentation fixes for pg_visibility

2016-06-27 Thread Robert Haas
On Thu, Jun 23, 2016 at 12:53 AM, Michael Paquier wrote: > On Thu, Jun 23, 2016 at 1:46 PM, Michael Paquier > wrote: >> On Thu, Jun 23, 2016 at 1:42 PM, Michael Paquier >> wrote: >>> While looking at the module I found two mistakes in the docs: >>> pg_visibility_map and pg_visibility *not* takin

Re: [HACKERS] Documentation fixes for pg_visibility

2016-06-22 Thread Michael Paquier
On Thu, Jun 23, 2016 at 1:46 PM, Michael Paquier wrote: > On Thu, Jun 23, 2016 at 1:42 PM, Michael Paquier > 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

Re: [HACKERS] Documentation fixes for pg_visibility

2016-06-22 Thread Michael Paquier
On Thu, Jun 23, 2016 at 1:42 PM, Michael Paquier 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"

[HACKERS] Documentation fixes for pg_visibility

2016-06-22 Thread Michael Paquier
Hi, 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. Thanks, -- Michael docs-visibility