| From: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> | 
|---|---|
| To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "PostgreSQL Bugs" <pgsql-bugs(at)postgresql(dot)org> | 
| Subject: | Re: WAL replay of truncate fails if the table was dropped | 
| Date: | 2007-07-20 17:36:21 | 
| Message-ID: | 1184952981.4428.76.camel@ebony.site | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
On Fri, 2007-07-20 at 11:38 -0400, Tom Lane wrote:
> Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> > Interestingly, this bug isn't triggered unless there's an already empty
> > or uninitialized page at the end of table. If vacuum removes the last
> > tuple from the page, that will be WAL-logged and replay of that calls
> > smgrcreate.
> 
> Yeah, I tried other ways to provoke the failure and came to the same
> conclusion.  The reproducer really is relying on the fact that vacuum's
> PageInit of an uninitialized page doesn't get WAL-logged.  Which is a
> bit nervous-making.  As far as I can think at the moment, it won't
> provoke any problem because the first subsequent WAL-logged touch of
> the page would be an INSERT with the INIT bit set; but it does mean
> that a warm-standby slave would be out of sync with the master for an
> indefinitely long period with respect to the on-disk contents of such a
> page.  Does that matter?
If I understand this: the primary would be initialised yet the standby
would remain uninitialised? I don't think that matters because the
actual the data contents are still zero.
-- 
  Simon Riggs
  EnterpriseDB  http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2007-07-20 18:06:30 | Re: WAL replay of truncate fails if the table was dropped | 
| Previous Message | Tom Lane | 2007-07-20 15:38:07 | Re: WAL replay of truncate fails if the table was dropped |