| From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> | 
|---|---|
| To: | Jeff Davis <pgsql(at)j-davis(dot)com> | 
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: page corruption on 8.3+ that makes it to standby | 
| Date: | 2010-07-28 11:02:30 | 
| Message-ID: | 1280314950.1878.4667.camel@ebony | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Tue, 2010-07-27 at 21:23 -0700, Jeff Davis wrote:
> Both potential fixes attached and both appear to work.
> 
> fix1 -- Only call PageSetLSN/TLI inside log_newpage() and
> heap_xlog_newpage() if the page is not zeroed.
> 
> fix2 -- Don't call log_newpage() at all if the page is not zeroed.
> 
> Please review. I don't have a strong opinion about which one should be
> applied.
ISTM we should just fix an uninitialized page first, using code from
VACUUM similar to
  if (PageIsNew(page))
  {
    ereport(WARNING,
	(errmsg("relation \"%s\" page %u is uninitialized --- fixing",
						relname, blkno)));
    PageInit(page, BufferGetPageSize(buf), 0);
  }
then continue as before.
We definitely shouldn't do anything that leaves standby different to
primary.
-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Development, 24x7 Support, Training and Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2010-07-28 11:10:47 | Re: PostGIS vs. PGXS in 9.0beta3 | 
| Previous Message | Dimitri Fontaine | 2010-07-28 10:55:56 | Re: Query optimization problem |