Re: Why copy_relation_data only use wal whenWALarchivingis enabled

From: "Jacky Leng" <lengjianquan(at)163(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why copy_relation_data only use wal whenWALarchivingis enabled
Date: 2007-10-18 01:27:49
Message-ID: ff6cqj$26ie$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


> Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> I tend to agree that truncating the file, and extending the fsync
> request mechanism to actually delete it after the next checkpoint,
> is the most reasonable route to a fix.
>

How about just allowing to use wal even WAL archiving is disabled?
It seems that recovery of "XLOG_HEAP_NEWPAGE" record will do the
right thing for us, look at "heap_xlog_newpage": XLogReadBuffer
with init=true will extend the block rightly and rebuild it rightly.

Someone may say that it's not worth recording xlog for operations
such as copy_relation_data, but these operations shouldn't happen
frequently.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-10-18 02:30:07 ts_rewrite aggregate API seems mighty ugly
Previous Message Kenneth Marshall 2007-10-18 00:43:32 Re: Hash index todo list item

Browse pgsql-patches by date

  From Date Subject
Next Message ITAGAKI Takahiro 2007-10-18 03:21:13 Re: BUG #3681: fillers are NULL in pgbench
Previous Message Tom Lane 2007-10-17 17:36:43 Re: [RFC] extended txid docs