Re: [HACKERS] FPI

2011-02-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] FPI

2011-02-01 Thread Robert Haas
On Tue, Feb 1, 2011 at 12:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] FPI

2011-01-31 Thread Robert Haas
On Fri, Jan 28, 2011 at 3:39 PM, Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] FPI

2011-01-31 Thread Greg Stark
On Fri, Jan 28, 2011 at 8:08 PM, Tom Lane t...@sss.pgh.pa.us 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

Re: [HACKERS] FPI

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

Re: [HACKERS] FPI

2011-01-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] FPI

2011-01-28 Thread Robert Haas
On Fri, Jan 28, 2011 at 10:13 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] FPI

2011-01-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Jan 28, 2011 at 10:13 AM, Tom Lane t...@sss.pgh.pa.us 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

Re: [HACKERS] FPI

2011-01-28 Thread Robert Haas
On Fri, Jan 28, 2011 at 1:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Jan 28, 2011 at 10:13 AM, Tom Lane t...@sss.pgh.pa.us wrote: Say what?  A heap deletion compacts the page --- it will certainly fail badly on torn-page. What do you mean by

Re: [HACKERS] FPI

2011-01-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com 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

Re: [HACKERS] FPI

2011-01-28 Thread Robert Haas
On Fri, Jan 28, 2011 at 3:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com 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

[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,