Re: Fundamental error in "no WAL log" index/file creation stuff

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fundamental error in "no WAL log" index/file creation stuff
Date: 2005-08-04 02:56:57
Message-ID: dcs0a9$2fi7$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes
> > Since there is no xlog replay mechanism to CREATE INDEX (bottom-up
method),
> > so CREATE INDEX won't get replayed in PITR?
>
> On what do you base either part of that statement?
>

I see _bt_load() still relies on smgrimmedsync() to assure a correct disk
image of the btree after a crash.

As you found out, this won't work if we do a CREATE DATABASE + CREATE INDEX
and system crashes. If you forced a checkpoint, then CREATE DATABASE won't
get replayed after the crashed, so the btree disk image is still there, then
the problem is solved in this case.

However, if we take a physical copy of the database, then do CREATE DATABASE
+ CREATE INDEX again, and we want to rollforward, from my understanding of
current _bt_load() code, I don't see anywhere to get the btree disk image
again.

Regards,
Qingqing

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2005-08-04 03:07:20 Re: Bug introduced by recent ALTER OWNER permissions check change
Previous Message Tom Lane 2005-08-04 02:30:24 Re: Fundamental error in "no WAL log" index/file creation stuff