Simon Riggs wrote:
> But perhaps writing a single WAL record if you scan whole page and set
> all bits at once. Then it makes sense in some cases.
So this is what I ended up doing; attached.
There are some gotchas in this patch:
1. it does not consider hint bits other than the ones defined in htup.h.
Some index AMs use hint bits to "kill" tuples (LP_DEAD mostly, I think).
This means that CRCs will be broken for such pages when pages are torn.
2. some parts of the code could be considered modularity violations.
For example, tqual.c is setting a bit in a Page structure; bufmgr.c is
later checking that bit to determine when to log.
3. the bgwriter is seen writing WAL entries at checkpoint. At shutdown,
this might cause an error to be reported on how there was not supposed
to be activity on the log. I didn't save the exact error report and I
can't find it in the source :-(
So it "mostly works" at this time. I very much welcome opinions to
improve the weak points.
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
In response to
pgsql-hackers by date
|Next:||From: Kevin Grittner||Date: 2008-10-29 18:34:54|
|Subject: recovery_target_time and last completed transaction log time|
|Previous:||From: Dann Corbit||Date: 2008-10-29 18:32:42|
|Subject: Re: Multi CPU Queries - Feedback and/or suggestions wanted!|