Re: [HACKERS] FPI

2011-02-01 Thread Robert Haas
On Tue, Feb 1, 2011 at 12:41 PM, Tom Lane wrote: > Robert Haas writes: >> So I'm back to proposing that we just apply FPI-free WAL records >> unconditionally, without regard to the LSN.  This could potentially >> corrupt the page, of course. > > Yes.  So you're still assuming that there will be a

Re: [HACKERS] FPI

2011-02-01 Thread Tom Lane
Robert Haas writes: > So I'm back to proposing that we just apply FPI-free WAL records > unconditionally, without regard to the LSN. This could potentially > corrupt the page, of course. Yes. So you're still assuming that there will be a later FPI-containing WAL record to fix up the mess you cr

Re: [HACKERS] FPI

2011-01-31 Thread Robert Haas
On Mon, Jan 31, 2011 at 10:01 AM, Robert Haas wrote: > On Fri, Jan 28, 2011 at 3:39 PM, Robert Haas wrote: >> What happens if we (a) keep the current rule after reaching >> consistency and (b) apply any such updates *unconditionally* - that >> is, without reference to the LSN - prior to reaching

Re: [HACKERS] FPI

2011-01-31 Thread Greg Stark
On Fri, Jan 28, 2011 at 8:08 PM, Tom Lane wrote: > 3. Page LSN > WAL location: do NOT apply field update or change LSN. > I don't think this works. There could be multiple writes to a page for different records before the crash occurs. The LSN could be far in the future and yet still have a torn

Re: [HACKERS] FPI

2011-01-31 Thread Robert Haas
On Fri, Jan 28, 2011 at 3:39 PM, Robert Haas wrote: > What happens if we (a) keep the current rule after reaching > consistency and (b) apply any such updates *unconditionally* - that > is, without reference to the LSN - prior to reaching consistency? > Under that rule, if we encounter an FPI befo

Re: [HACKERS] FPI

2011-01-28 Thread Robert Haas
On Fri, Jan 28, 2011 at 3:08 PM, Tom Lane wrote: > Robert Haas writes: >> Any substantive comments, besides the obvious "this is not 9.1 material"? > > Now that I've absorbed a bit more caffeine, let's see if I can think > straight this time. > > General principle you want to assert: any WAL entr

Re: [HACKERS] FPI

2011-01-28 Thread Tom Lane
Robert Haas writes: > Any substantive comments, besides the obvious "this is not 9.1 material"? Now that I've absorbed a bit more caffeine, let's see if I can think straight this time. General principle you want to assert: any WAL entry that merely results in setting a deterministic field to a d

Re: [HACKERS] FPI

2011-01-28 Thread Robert Haas
On Fri, Jan 28, 2011 at 1:42 PM, Tom Lane wrote: > Robert Haas writes: >> On Fri, Jan 28, 2011 at 10:13 AM, Tom Lane wrote: >>> Say what?  A heap deletion compacts the page --- it will certainly fail >>> badly on torn-page. > >> What do you mean by "compacts the page"?  I would interpret that to

Re: [HACKERS] FPI

2011-01-28 Thread Tom Lane
Robert Haas writes: > On Fri, Jan 28, 2011 at 10:13 AM, Tom Lane wrote: >> Say what?  A heap deletion compacts the page --- it will certainly fail >> badly on torn-page. > What do you mean by "compacts the page"? I would interpret that to > mean "reclaims the space formerly used by the tuple be

Re: [HACKERS] FPI

2011-01-28 Thread Robert Haas
On Fri, Jan 28, 2011 at 10:13 AM, Tom Lane wrote: > Robert Haas writes: >> I was thinking about full-page writes again tonight.  I'm still >> wondering about the feasibility of getting rid of full-page writes for >> certain operations.  We can do this, I think, in any case where we can >> convinc

Re: [HACKERS] FPI

2011-01-28 Thread Tom Lane
Robert Haas writes: > I was thinking about full-page writes again tonight. I'm still > wondering about the feasibility of getting rid of full-page writes for > certain operations. We can do this, I think, in any case where we can > convince ourselves that if the original operation, or a redo of

[HACKERS] FPI

2011-01-27 Thread Robert Haas
I was thinking about full-page writes again tonight. I'm still wondering about the feasibility of getting rid of full-page writes for certain operations. We can do this, I think, in any case where we can convince ourselves that if the original operation, or a redo of the original operation, leave