Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-14 Thread Robert Haas
On Wed, Dec 12, 2012 at 12:31 PM, Pavan Deolasee wrote: > On Wed, Dec 12, 2012 at 1:35 AM, Robert Haas wrote: >> On Tue, Dec 4, 2012 at 12:10 PM, Pavan Deolasee >> wrote: >>> Hmm. Yeah, I do not have guts to prove that either. I'll probably write up a >>> comment for your consideration to explai

Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-12 Thread Pavan Deolasee
On Wed, Dec 12, 2012 at 1:35 AM, Robert Haas wrote: > On Tue, Dec 4, 2012 at 12:10 PM, Pavan Deolasee > wrote: >> Hmm. Yeah, I do not have guts to prove that either. I'll probably write up a >> comment for your consideration to explain why we don't trust PD_ALL_VISIBLE >> in Hot standby for seq s

Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-11 Thread Robert Haas
On Tue, Dec 4, 2012 at 12:10 PM, Pavan Deolasee wrote: > Hmm. Yeah, I do not have guts to prove that either. I'll probably write up a > comment for your consideration to explain why we don't trust PD_ALL_VISIBLE > in Hot standby for seq scans, but still trust VM for index-only scans. Sure. > Ano

Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-04 Thread Pavan Deolasee
On Tue, Dec 4, 2012 at 8:03 PM, Robert Haas wrote: > On Tue, Dec 4, 2012 at 9:00 AM, Andres Freund > wrote: > > Youre right, it currently seems to be possible, there's no LSN interlock > > prohibiting this as far as I can see. > > Yeah, there certainly isn't that. Now you could perhaps make an

Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-04 Thread Robert Haas
On Tue, Dec 4, 2012 at 10:38 AM, Andres Freund wrote: > I wonder if we could solve that by having an in-memory-only LSN that > only interlocks the hint bit writes, but doesn't cause full page > writes... It's not really a hint bit, because if it fails to get set when the visibility map bit gets s

Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-04 Thread Andres Freund
On 2012-12-04 09:33:28 -0500, Robert Haas wrote: > On Tue, Dec 4, 2012 at 9:00 AM, Andres Freund wrote: > > Youre right, it currently seems to be possible, there's no LSN interlock > > prohibiting this as far as I can see. > > Yeah, there certainly isn't that. Now you could perhaps make an > argu

Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-04 Thread Robert Haas
On Tue, Dec 4, 2012 at 9:00 AM, Andres Freund wrote: > Youre right, it currently seems to be possible, there's no LSN interlock > prohibiting this as far as I can see. Yeah, there certainly isn't that. Now you could perhaps make an argument that no operation that can propagate a set bit from mas

Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-04 Thread Andres Freund
On 2012-12-04 08:38:48 -0500, Robert Haas wrote: > On Tue, Dec 4, 2012 at 8:08 AM, Pavan Deolasee > wrote: > > > > I was looking at the following code in heapam.c: > > > > 261 /* > > 262 * If the all-visible flag indicates that all tuples on the page > > are > > 263 * visible to

Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-04 Thread Robert Haas
On Tue, Dec 4, 2012 at 8:08 AM, Pavan Deolasee wrote: > > I was looking at the following code in heapam.c: > > 261 /* > 262 * If the all-visible flag indicates that all tuples on the page > are > 263 * visible to everyone, we can skip the per-tuple visibility tests. > But > 264

Re: [HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-04 Thread Andres Freund
On 2012-12-04 18:38:11 +0530, Pavan Deolasee wrote: > I was looking at the following code in heapam.c: > > 261 /* > 262 * If the all-visible flag indicates that all tuples on the page > are > 263 * visible to everyone, we can skip the per-tuple visibility > tests. But > 264 *

[HACKERS] PageIsAllVisible()'s trustworthiness in Hot Standby

2012-12-04 Thread Pavan Deolasee
I was looking at the following code in heapam.c: 261 /* 262 * If the all-visible flag indicates that all tuples on the page are 263 * visible to everyone, we can skip the per-tuple visibility tests. But 264 * not in hot standby mode. A tuple that's already visible to all 26