Re: PITR, checkpoint, and local relations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "J(dot) R(dot) Nield" <jrnield(at)usol(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Richard Tucker <richt(at)multera(dot)com>, PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PITR, checkpoint, and local relations
Date: 2002-08-02 14:01:36
Message-ID: 29568.1028296896@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"J. R. Nield" <jrnield(at)usol(dot)com> writes:
> Ok. This is what I wanted to hear, but I had assumed someone decided to
> put it in for a reason, and I wasn't going to submit a patch to pull-out
> the local buffer manager without clearing it first.

> The main area where it seems to get heavy use is during index builds,

Yeah. I do not think it really saves any I/O: unless you abort your
index build, the data is eventually going to end up on disk anyway.
What it saves is contention for shared buffers (the overhead of
acquiring BufMgrLock, for example).

Just out of curiosity, though, what does it matter? On re-reading your
message I think you are dealing with a non problem, or at least the
wrong problem. Local relations do not need to be checkpointed, because
by definition they were created by a transaction that hasn't committed
yet. They must be, and are, checkpointed to disk before the transaction
commits; but up till that time, if you have a crash then the entire
relation should just go away.

That mechanism is there already --- perhaps it needs a few tweaks for
PITR but I do not see any need for cross-backend flush commands for
local relations.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Copeland 2002-08-02 14:14:46 Re: Why is MySQL more chosen over PostgreSQL?
Previous Message cbbrowne 2002-08-02 13:55:07 Third Manifesto